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

# Create a site partner

> This endpoint creates a site partner.
<br/><i>This action is not enabled by default. You must request additional permissions to perform this action.</i>




## OpenAPI

````yaml /api/specs/assetManagement-api.json post /asset-management/v1/site-partners
openapi: 3.0.0
info:
  title: Lynkwell API
  version: 1.376.0
  description: API Documentation for assetManagement service
servers:
  - url: https://api.lynkwell.com
security: []
tags: []
paths:
  /asset-management/v1/site-partners:
    post:
      tags:
        - Site Partners
      summary: Create a site partner
      description: >
        This endpoint creates a site partner.

        <br/><i>This action is not enabled by default. You must request
        additional permissions to perform this action.</i>
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSitePartnerParams'
      responses:
        '200':
          description: The site partner was successfully created.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/SitePartner'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssetManagementBadRequestError'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssetManagementUnauthorizedError'
        '403':
          description: >-
            Forbidden. Returned when the site partner user does not exist or is
            not associated with the current network.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AllForbiddenErrors'
        '500':
          description: Internal Error
      security:
        - oauth2:
            - write:sitepartner
components:
  schemas:
    CreateSitePartnerParams:
      type: object
      description: Should provide the same key that is used in the type property
      required:
        - type
      properties:
        type:
          description: The type of site partner (siteHost or utility or reportingAgency)
          type: string
          enum:
            - siteHost
            - utility
            - reportingAgency
        network:
          description: The network associated with the site partner
          type: string
        siteHost:
          $ref: '#/components/schemas/CreateSiteHostParams'
        utility:
          $ref: '#/components/schemas/CreateUtilityParams'
        reportingAgency:
          $ref: '#/components/schemas/CreateReportingAgencyParams'
    SitePartner:
      type: object
      required:
        - id
        - type
        - createdAt
        - updatedAt
      properties:
        id:
          type: string
        type:
          type: string
          enum:
            - siteHost
            - utility
            - reportingAgency
        network:
          description: Site partners of type "siteHost" will always have a network
          type: object
          properties:
            id:
              type: string
          required:
            - id
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        siteHost:
          $ref: '#/components/schemas/SiteHost'
        utility:
          $ref: '#/components/schemas/Utility'
        reportingAgency:
          $ref: '#/components/schemas/ReportingAgency'
    AssetManagementBadRequestError:
      type: object
      description: The response body for a 400 request
      properties:
        type:
          type: string
          enum:
            - BAD_REQUEST
        code:
          type: string
          enum:
            - INVALID_REQUEST_PARAMETERS
            - REFERENCE_ERROR
            - UNSUPPORTED_TYPE
            - LOCATION_VALIDATION_ERROR
            - CHARGING_STATION_VALIDATION_ERROR
            - SITE_HOST_VALIDATION_ERROR
            - UTILITY_VALIDATION_ERROR
            - UTILITY_USER_NOT_ALLOWED
            - INVALID_CONTACT_DETAILS
            - CONTACT_DETAILS_ALREADY_EXISTS
            - SITE_PARTNER_USER_ARCHIVED
            - ASSET_NOT_CONNECTED
            - LICENSE_ALREADY_ASSIGNED
            - INVALID_AUTH_METHOD
            - INVALID_ENROLLED_SERVICES
            - UNSUPPORTED_PAYMENT_TERMINAL_PROVIDER
            - UNSUPPORTED_SIM_PROVIDER
            - RATE_IN_USE
            - CHARGING_STATION_MODEL_ARCHIVED
            - OPERATING_SITE_HOST_NOT_FOUND
            - OPERATING_SITE_HOST_INVALID_TYPE
            - OPERATING_SITE_HOST_ARCHIVED
            - LOCATION_ARCHIVED
        message:
          type: string
    AssetManagementUnauthorizedError:
      type: object
      description: The response body for a 401 request
      properties:
        message:
          type: string
    AllForbiddenErrors:
      oneOf:
        - type: object
          description: The response body for a 403 request
          properties:
            message:
              type: string
        - type: object
          description: The response body for a 400 request
          properties:
            type:
              type: string
              enum:
                - BAD_REQUEST
            code:
              type: string
              enum:
                - INVALID_REQUEST_PARAMETERS
                - REFERENCE_ERROR
                - UNSUPPORTED_TYPE
                - LOCATION_VALIDATION_ERROR
                - CHARGING_STATION_VALIDATION_ERROR
                - SITE_HOST_VALIDATION_ERROR
                - UTILITY_VALIDATION_ERROR
                - UTILITY_USER_NOT_ALLOWED
                - INVALID_CONTACT_DETAILS
                - CONTACT_DETAILS_ALREADY_EXISTS
                - SITE_PARTNER_USER_ARCHIVED
                - ASSET_NOT_CONNECTED
                - LICENSE_ALREADY_ASSIGNED
                - INVALID_AUTH_METHOD
                - INVALID_ENROLLED_SERVICES
                - UNSUPPORTED_PAYMENT_TERMINAL_PROVIDER
                - UNSUPPORTED_SIM_PROVIDER
                - RATE_IN_USE
                - CHARGING_STATION_MODEL_ARCHIVED
                - OPERATING_SITE_HOST_NOT_FOUND
                - OPERATING_SITE_HOST_INVALID_TYPE
                - OPERATING_SITE_HOST_ARCHIVED
                - LOCATION_ARCHIVED
            message:
              type: string
    CreateSiteHostParams:
      type: object
      description: Details specific to the site host type of site partner
      required:
        - name
        - physicalAddress
        - contactDetails
      properties:
        name:
          type: string
        physicalAddress:
          $ref: '#/components/schemas/PhysicalAddress'
        contactDetails:
          type: object
          properties:
            phone:
              type: string
            email:
              type: string
          required:
            - email
        nayax:
          type: object
          nullable: true
          description: Nayax integration metadata.
          properties:
            subOperatorId:
              type: number
              nullable: true
    CreateUtilityParams:
      type: object
      description: Details specific to the utility type of site partner
      required:
        - name
        - physicalAddress
        - contactDetails
      properties:
        name:
          type: string
        physicalAddress:
          $ref: '#/components/schemas/PhysicalAddress'
        contactDetails:
          type: object
          properties:
            phone:
              type: string
            email:
              type: string
          required:
            - email
    CreateReportingAgencyParams:
      type: object
      description: Details specific to the reporting agency type of site partner
      required:
        - name
        - physicalAddress
        - contactDetails
      properties:
        name:
          type: string
        physicalAddress:
          $ref: '#/components/schemas/PhysicalAddress'
        contactDetails:
          type: object
          properties:
            phone:
              type: string
            email:
              type: string
          required:
            - email
    SiteHost:
      type: object
      properties:
        name:
          type: string
        physicalAddress:
          $ref: '#/components/schemas/PhysicalAddress'
        contactDetails:
          type: object
          properties:
            phone:
              type: string
            email:
              type: string
          required:
            - email
        nayax:
          type: object
          nullable: true
          description: Nayax integration metadata. Only populated for site hosts.
          properties:
            subOperatorId:
              type: number
              nullable: true
      required:
        - name
        - physicalAddress
    Utility:
      type: object
      properties:
        name:
          type: string
        physicalAddress:
          $ref: '#/components/schemas/PhysicalAddress'
        contactDetails:
          type: object
          properties:
            phone:
              type: string
            email:
              type: string
          required:
            - email
      required:
        - name
        - physicalAddress
    ReportingAgency:
      type: object
      properties:
        name:
          type: string
        physicalAddress:
          $ref: '#/components/schemas/PhysicalAddress'
        contactDetails:
          type: object
          properties:
            phone:
              type: string
            email:
              type: string
          required:
            - email
      required:
        - name
        - physicalAddress
    PhysicalAddress:
      description: Physical address details
      type: object
      properties:
        streetNumber:
          type: string
          minLength: 1
          maxLength: 100
        streetName:
          type: string
          minLength: 1
          maxLength: 100
        streetDetails:
          type: string
          minLength: 1
          maxLength: 100
        city:
          type: string
          minLength: 1
          maxLength: 100
        state:
          $ref: '#/components/schemas/USStates'
        postalCode:
          type: string
          minLength: 1
          maxLength: 10
        countryCode:
          type: string
          enum:
            - US
            - CA
      required:
        - streetNumber
        - streetName
        - city
        - state
        - postalCode
        - countryCode
    USStates:
      type: string
      enum:
        - AL
        - AK
        - AZ
        - AR
        - CA
        - CO
        - CT
        - DE
        - FL
        - GA
        - HI
        - ID
        - IL
        - IN
        - IA
        - KS
        - KY
        - LA
        - ME
        - MD
        - MA
        - MI
        - MN
        - MS
        - MO
        - MT
        - NE
        - NV
        - NH
        - NJ
        - NM
        - NY
        - NC
        - ND
        - OH
        - OK
        - OR
        - PA
        - RI
        - SC
        - SD
        - TN
        - TX
        - UT
        - VT
        - VA
        - WA
        - WV
        - WI
        - WY
        - DC
        - AS
        - GU
        - MP
        - PR
        - UM
        - VI
  securitySchemes:
    oauth2:
      type: oauth2
      description: OAuth2 Client Credentials Flow
      flows:
        clientCredentials:
          tokenUrl: https://lynkwell-prod.us.auth0.com/oauth/token
          scopes:
            read:asset: Retrieve assets
            write:asset: Create and update assets
            read:assetgroup: Retrieve asset groups
            write:assetgroup: Create and update asset groups
            read:assetstatus: Retrieve asset statuses
            read:chargingstationmodel: Retrieve charging station models
            write:chargingstationmodel: Create and update charging station models
            write:network: Create and update networks
            write:sitepartner: Create and update site partners
            read:sitepartner: Retrieve site partners
            write:sitepartneruser: Create and update site partner users
            read:sitepartneruser: Retrieve site partner users
            read:networkaccessprofile: Retrieve network access profiles
            write:paymentprofile: Create payment profile
            write:onboardinglink: Create an onboarding link
            read:invoice: Retrieve an invoice
            write:session: Create or update a session
            read:session: Retrieve a session
            write:ticket: Create a ticket
            write:verificationcode: Send and confirm verification codes
            write:driver: Create and update drivers
            read:driver: Retrieve drivers
            write:token: Create and update tokens
            read:token: Retrieve tokens
            read:tokenvalue: Retrieve token by ID including its value
            write:invitecode: Create and update invite codes
            write:invitation: Create and update invitations
            read:invitation: Retrieve invitations
            read:payment_terminals_payment: Read payments from payment terminal
            abort:session: Abruptly end session
            read:paymentprofile: Retrieve payment profile from payment terminal
            write:ocpp: Sends request over OCPP
            write:ocpp.raw_request: Sends raw request over OCPP
            write:notification.email: Create and update email
            read:invoiceitem: Retrieve invoice item
            read:subscription: Retrieve subscription
            write:plugandcharge_enrollment: Update Plug and Charge enrollment status
            write:projects: Create and update projects
            read:projects: Retrieve projects
            write:project_stations: Create and update project stations
            write:panel: Create and update panels.
            read:panel: Retrieve panels.
            write:webhooks: Create, update, and delete webhooks
            read:webhooks: Retrieve webhooks

````