# Partners API

Source: https://frameleaf.app/docs/api/reference/partners/

Use your own server and its scoped API keys.

## Retrieve partners

GET /api/partners

Retrieve a list of partners with whom assets are shared.

```json
{
  "description": "Retrieve a list of partners with whom assets are shared.",
  "operationId": "getPartners",
  "parameters": [
    {
      "name": "direction",
      "required": true,
      "in": "query",
      "schema": {
        "$ref": "#/components/schemas/PartnerDirection"
      }
    }
  ],
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "items": {
              "$ref": "#/components/schemas/PartnerResponseDto"
            },
            "type": "array"
          }
        }
      },
      "description": ""
    }
  },
  "security": [
    {
      "api_key": []
    }
  ],
  "summary": "Retrieve partners",
  "tags": [
    "Partners"
  ],
  "x-frameleaf-permission": "partner.read"
}
```

## Create a partner

POST /api/partners

Create a new partner to share assets with.

```json
{
  "description": "Create a new partner to share assets with.",
  "operationId": "createPartner",
  "parameters": [],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/PartnerCreateDto"
        }
      }
    },
    "required": true
  },
  "responses": {
    "201": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/PartnerResponseDto"
          }
        }
      },
      "description": ""
    }
  },
  "security": [
    {
      "api_key": []
    }
  ],
  "summary": "Create a partner",
  "tags": [
    "Partners"
  ],
  "x-frameleaf-permission": "partner.create"
}
```

## Get the Locked partner items notice

GET /api/partners/locked-notice

Whether to show the one-time notice that Locked items arrived from a partner and stay hidden until you set a PIN.

```json
{
  "description": "Whether to show the one-time notice that Locked items arrived from a partner and stay hidden until you set a PIN.",
  "operationId": "getPartnerLockedNotice",
  "parameters": [],
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/PartnerLockedNoticeResponseDto"
          }
        }
      },
      "description": ""
    }
  },
  "security": [
    {
      "api_key": []
    }
  ],
  "summary": "Get the Locked partner items notice",
  "tags": [
    "Partners"
  ],
  "x-frameleaf-permission": "partner.read"
}
```

## Dismiss the Locked partner items notice

PUT /api/partners/locked-notice

Dismisses the one-time notice about Locked partner items for good. The items stay locked.

```json
{
  "description": "Dismisses the one-time notice about Locked partner items for good. The items stay locked.",
  "operationId": "dismissPartnerLockedNotice",
  "parameters": [],
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/PartnerLockedNoticeResponseDto"
          }
        }
      },
      "description": ""
    }
  },
  "security": [
    {
      "api_key": []
    }
  ],
  "summary": "Dismiss the Locked partner items notice",
  "tags": [
    "Partners"
  ],
  "x-frameleaf-permission": "partner.update"
}
```

## Remove a partner

DELETE /api/partners/{id}

Stop sharing assets with a partner.

```json
{
  "description": "Stop sharing assets with a partner.",
  "operationId": "removePartner",
  "parameters": [
    {
      "name": "id",
      "required": true,
      "in": "path",
      "schema": {
        "format": "uuid",
        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$",
        "type": "string"
      }
    }
  ],
  "responses": {
    "204": {
      "description": ""
    }
  },
  "security": [
    {
      "api_key": []
    }
  ],
  "summary": "Remove a partner",
  "tags": [
    "Partners"
  ],
  "x-frameleaf-permission": "partner.delete"
}
```

## Create a partner

POST /api/partners/{id}

Create a new partner to share assets with.

```json
{
  "deprecated": true,
  "description": "Create a new partner to share assets with.",
  "operationId": "createPartnerDeprecated",
  "parameters": [
    {
      "name": "id",
      "required": true,
      "in": "path",
      "schema": {
        "format": "uuid",
        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$",
        "type": "string"
      }
    }
  ],
  "responses": {
    "201": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/PartnerResponseDto"
          }
        }
      },
      "description": ""
    }
  },
  "security": [
    {
      "api_key": []
    }
  ],
  "summary": "Create a partner",
  "tags": [
    "Partners",
    "Deprecated"
  ],
  "x-frameleaf-permission": "partner.create"
}
```

## Update a partner

PUT /api/partners/{id}

A partnership has no settings left (): partners receive their own copies and locations are always shared. Kept for older clients; returns the partner who shares with the user.

```json
{
  "description": "A partnership has no settings left (): partners receive their own copies and locations are always shared. Kept for older clients; returns the partner who shares with the user.",
  "operationId": "updatePartner",
  "parameters": [
    {
      "name": "id",
      "required": true,
      "in": "path",
      "schema": {
        "format": "uuid",
        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$",
        "type": "string"
      }
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/PartnerUpdateDto"
        }
      }
    },
    "required": true
  },
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/PartnerResponseDto"
          }
        }
      },
      "description": ""
    }
  },
  "security": [
    {
      "api_key": []
    }
  ],
  "summary": "Update a partner",
  "tags": [
    "Partners"
  ],
  "x-frameleaf-permission": "partner.update"
}
```
