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

# Set AppleCare Enterprise

> Set the company's AppleCare Enterprise enrollment, as an admin does on the cockpit's Procurement settings page, and return the settings as `getPurchasingSettings` does. `enrollmentId` is the enrollment ID Apple gives the company: once set, AppleCare Enterprise can be added to the Apple devices of an order. `durationYears` is the coverage duration, 3 or 4 years; left out, the stored one stays. `enrollmentId: null` removes the enrollment. Primo stores the ID as given and does not check it with Apple. The order notification email and the default device lifetime are changed with `updatePurchasingSettings` instead.

Key: WriteScope: Company


## OpenAPI

````yaml https://api.getprimo.com/openapi.json put /purchasing-settings/apple-care-enterprise
openapi: 3.1.1
info:
  title: Public API - BETA
  description: Read docs on https://docs.getprimo.com/
  version: '1.0'
  contact: {}
servers:
  - url: https://api.getprimo.com
security:
  - apikey: []
tags: []
paths:
  /purchasing-settings/apple-care-enterprise:
    put:
      tags:
        - PurchasingSettings
      summary: Set AppleCare Enterprise
      description: >-
        Set the company's AppleCare Enterprise enrollment, as an admin does on
        the cockpit's Procurement settings page, and return the settings as
        `getPurchasingSettings` does. `enrollmentId` is the enrollment ID Apple
        gives the company: once set, AppleCare Enterprise can be added to the
        Apple devices of an order. `durationYears` is the coverage duration, 3
        or 4 years; left out, the stored one stays. `enrollmentId: null` removes
        the enrollment. Primo stores the ID as given and does not check it with
        Apple. The order notification email and the default device lifetime are
        changed with `updatePurchasingSettings` instead.
      operationId: updateAppleCareEnterprise
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateAppleCareEnterpriseBody'
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PurchasingSettings_Output'
components:
  schemas:
    UpdateAppleCareEnterpriseBody:
      type: object
      properties:
        enrollmentId:
          description: >-
            The company's AppleCare Enterprise enrollment ID, as Apple gives it.
            null removes the enrollment: the AppleCare Enterprise option is then
            no longer offered on orders.
          anyOf:
            - type: string
              minLength: 1
            - type: 'null'
        durationYears:
          description: >-
            Coverage duration, in years: 3 or 4. Left out, the stored one stays
            (3 by default).
          type: number
          enum:
            - 3
            - 4
      required:
        - enrollmentId
    PurchasingSettings_Output:
      type: object
      properties:
        orderEmail:
          description: Email that receives the order notifications, null when none is set.
          anyOf:
            - type: string
            - type: 'null'
        defaultDeviceDecommissioningYears:
          type: number
          description: >-
            Default lifetime of a device, in years: the refresh date
            (`decommissioningDate`) Primo gives a device is its purchase date
            plus this.
        appleCareEnterpriseEnrollmentId:
          description: >-
            AppleCare Enterprise enrollment ID of the company, null when it is
            not enrolled.
          anyOf:
            - type: string
            - type: 'null'
        appleCareEnterpriseDurationYears:
          type: number
          description: >-
            AppleCare Enterprise coverage duration, in years. It only applies
            once an enrollment ID is set.
          enum:
            - 3
            - 4
      required:
        - orderEmail
        - defaultDeviceDecommissioningYears
        - appleCareEnterpriseEnrollmentId
        - appleCareEnterpriseDurationYears
      additionalProperties: false
  securitySchemes:
    apikey:
      scheme: bearer
      bearerFormat: API key
      type: http
      description: >-
        Use your Primo API key in the Authorization header as `Bearer
        <API_KEY>`.

````

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