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

# Retrieve resource assignments

> Retrieve resource assignments in the location. An assignment links a resource, or a number of seats in it, to a company or a member for the duration of a subscription. <h3>OAuth</h3>Required scopes: <code>resources.readonly</code> or <code>resources</code>



## OpenAPI

````yaml /assets/openapi.json get /resources/v1/assignments
openapi: 3.0.2
info:
  title: Spacebring
  version: 1.0.0
  termsOfService: https://www.spacebring.com/terms
servers:
  - url: https://api.spacebring.com
security: []
paths:
  /resources/v1/assignments:
    get:
      tags:
        - Resources
      summary: Retrieve resource assignments
      description: >-
        Retrieve resource assignments in the location. An assignment links a
        resource, or a number of seats in it, to a company or a member for the
        duration of a subscription. <h3>OAuth</h3>Required scopes:
        <code>resources.readonly</code> or <code>resources</code>
      operationId: getAssignments
      parameters:
        - in: query
          name: limit
          required: false
          description: >-
            Maximum number of assignments per page. Defaults to 25 when omitted
            or invalid; values above 100 are capped at 100. Ignored when
            registrationRef is used.
          schema:
            type: integer
            minimum: 1
            maximum: 100
        - in: query
          name: locationRef
          required: false
          description: UUID of the location whose resource assignments to list.
          schema:
            type: string
            format: uuid
        - in: query
          name: nextPageToken
          required: false
          description: >-
            Pagination token from nextPageToken in a previous response. Keep the
            same filters when fetching the next page. Ignored when
            registrationRef is used.
          schema:
            type: string
        - in: header
          name: spacebring-network-id
          schema:
            type: string
            format: uuid
          required: false
          description: >-
            The id of the network. Required when using bearer token
            authentication
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/getAssignments'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/responseError'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/responseError'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/responseError'
      security:
        - BasicAuth: []
        - OAuth2:
            - resources.readonly
            - resources
components:
  schemas:
    getAssignments:
      type: object
      properties:
        assignments:
          type: array
          items:
            type: object
            properties:
              company:
                deprecated: true
                description: >-
                  Deprecated. Use customer instead. Company assigned to the
                  resource.
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                    description: Company id.
                  title:
                    description: >-
                      Company name. Present only for admin callers and the
                      customer's own assignments.
                    type: string
                required:
                  - id
                additionalProperties: false
              customer:
                description: Customer the resource is assigned to.
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                    description: Customer id.
                  title:
                    description: Company name when the customer is a company.
                    type: string
                  type:
                    type: string
                    enum:
                      - user
                      - company
                    description: Whether the customer is a user or company.
                  user:
                    description: User details when the customer is a user.
                    type: object
                    properties:
                      email:
                        description: User email.
                        nullable: true
                        type: string
                      id:
                        type: string
                        format: uuid
                        description: User id.
                      name:
                        description: User first name.
                        nullable: true
                        type: string
                      surname:
                        description: User last name.
                        nullable: true
                        type: string
                    required:
                      - id
                    additionalProperties: false
                required:
                  - id
                  - type
                additionalProperties: false
              endDate:
                description: ISO timestamp when the assignment ends.
                type: string
              entire:
                type: boolean
                description: Whether the assignment grants access to the entire resource.
              id:
                description: Assignment id.
                type: string
                format: uuid
              membership:
                deprecated: true
                description: >-
                  Deprecated. Use customer instead. Membership linked to the
                  assignment.
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                    description: Membership id.
                required:
                  - id
                additionalProperties: false
              quantity:
                description: Assigned quantity when the resource is partially assigned.
                type: number
              resource:
                description: >-
                  Resource the assignment belongs to. Present when assignments
                  are listed on their own.
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                    description: Resource id.
                  imageUrl:
                    description: Resource image URL.
                    type: string
                  locationRef:
                    type: string
                    format: uuid
                    description: UUID of the location the resource belongs to.
                  title:
                    type: string
                    description: Resource title.
                  type:
                    type: string
                    description: Resource type.
                required:
                  - id
                  - locationRef
                  - title
                  - type
                additionalProperties: false
              resourceRef:
                type: string
                format: uuid
                description: UUID of the resource the assignment belongs to.
              startDate:
                type: string
                description: ISO timestamp when the assignment starts.
              subscription:
                type: object
                properties:
                  endDate:
                    description: ISO timestamp when the assignment ends.
                    type: string
                  id:
                    description: >-
                      Subscription id. Absent for assignments created directly
                      by an admin.
                    type: string
                    format: uuid
                  startDate:
                    type: string
                    description: ISO timestamp when the assignment starts.
                required:
                  - startDate
                additionalProperties: false
                description: >-
                  Deprecated. Use startDate and endDate instead. Subscription
                  backing this assignment.
              user:
                deprecated: true
                description: >-
                  Deprecated. Use customer instead. User assigned to the
                  resource.
                type: object
                properties:
                  email:
                    description: User email.
                    nullable: true
                    type: string
                  id:
                    type: string
                    format: uuid
                    description: User id.
                  name:
                    description: User first name.
                    nullable: true
                    type: string
                  surname:
                    description: User last name.
                    nullable: true
                    type: string
                required:
                  - id
                additionalProperties: false
            required:
              - entire
              - resourceRef
              - startDate
              - subscription
            additionalProperties: false
          description: List of resource assignments in the location.
        nextPageToken:
          description: Pagination token to fetch the next page of results.
          type: string
        searchQueryNext:
          description: >-
            Search query parameters for the next page of results. Includes all
            filters used to fetch the current page.
          type: string
      required:
        - assignments
      additionalProperties: false
    responseError:
      type: object
      properties:
        message:
          type: string
        type:
          type: string
  securitySchemes:
    BasicAuth:
      type: http
      description: >-
        See our [authentication
        documentation](https://www.spacebring.com/docs/developer/api/authentication#basic-authentication)
        for how to authorize your requests
      scheme: basic
    OAuth2:
      type: oauth2
      description: >-
        See our [authentication
        documentation](https://www.spacebring.com/docs/developer/api/authentication#oauth2)
        for how to authorize your requests
      flows:
        authorizationCode:
          authorizationUrl: https://api.spacebring.com/oauth2/authorize
          tokenUrl: https://api.spacebring.com/oauth2/token
          refreshUrl: https://api.spacebring.com/oauth2/token
          scopes:
            benefits.readonly: Read benefits and applications
            benefits: Read and write benefits and applications
            checkIns.readonly: Read check-ins
            checkIns: Read and write check-ins
            community.readonly: Read community companies and memberships
            community: Read and write community companies and memberships
            events.readonly: Read events and tickets
            events: Read and write events and tickets
            feed.readonly: Read feed posts
            feed: Read and write feed posts
            invoices.readonly: Read contracts, credit notes, discounts and invoices
            invoices: Read and write contract, credit notes, discounts and invoices
            locations.readonly: Read locations
            locations: Read and write locations
            plans.readonly: Read plans
            plans: Read and write plans
            resources.readonly: Read resources and bookings
            resources: Read and write resources and bookings
            subscriptions.readonly: Read subscriptions
            subscriptions: Read and write subscriptions
            shop.readonly: Read products and orders
            shop: Read and write products and orders
            support.readonly: Read support tickets
            support: Read and write support tickets
            transactions.readonly: Read transactions
            transactions: Read and write transactions
            visitors.readonly: Read visitors
            visitors: Read and write visitors

````