---
agentTools:
  projectIndex: https://apidocs.macrofab.com/llms.txt
---

# Update Approved Vendor List

Update an approved vendor list's attributes. Fields you leave out are not changed. To change
the list's parts, use `PUT /api/v4/quote/approved_vendor_list/{approved_vendor_list_id}/parts`.

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "MacroFab API",
    "description": "MacroFab API\n\n**Authentication**\n\nAuthenticate every request by sending your API key in the `X-MacroFab-API-Key` header.\nRequests act as the user that generated the API key.\n\n**Responses**\n\nSend `Accept: application/json` with every request. Some endpoints return an empty response\nwithout it.\n\n**Versions**\n\nEndpoints are versioned in their path (`/api/v2/`, `/api/v3/`, `/api/v4/`, `/api/v5/`), and\ndifferent endpoints are at different versions. Use the version documented here for each\nendpoint.\n",
    "version": "1.1.0"
  },
  "servers": [
    {
      "url": "https://api.macrofab.com"
    }
  ],
  "paths": {
    "/api/v4/quote/approved_vendor_list/{approved_vendor_list_id}": {
      "put": {
        "tags": [
          "Parts"
        ],
        "summary": "Update Approved Vendor List",
        "description": "Update an approved vendor list's attributes. Fields you leave out are not changed. To change\nthe list's parts, use `PUT /api/v4/quote/approved_vendor_list/{approved_vendor_list_id}/parts`.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "precedence_preference": {
                    "type": "string",
                    "description": "How MacroFab chooses among the parts; see `GET` for details",
                    "enum": [
                      "price",
                      "manual"
                    ]
                  },
                  "customer_part_number": {
                    "type": "string",
                    "description": "Your internal part number for the AVL",
                    "example": "PG8092"
                  },
                  "description": {
                    "type": "string",
                    "example": "Alternates suitable for CPN PG8092"
                  }
                }
              },
              "example": {
                "precedence_preference": "manual",
                "customer_part_number": "PG8092"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated AVL",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "An approved vendor list (AVL) and its parts, without quote information",
                  "additionalProperties": true,
                  "required": [
                    "id",
                    "internal_part_number",
                    "organization_id",
                    "precedence_preference",
                    "kind",
                    "parts"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "example": "48774583-95e5-42c7-ad5b-1815b0c22670"
                    },
                    "internal_part_number": {
                      "type": "string",
                      "example": "MFI-C1879318-392420"
                    },
                    "customer_part_number": {
                      "type": "string",
                      "nullable": true
                    },
                    "description": {
                      "type": "string",
                      "nullable": true
                    },
                    "organization_id": {
                      "type": "string"
                    },
                    "is_global": {
                      "type": "boolean"
                    },
                    "precedence_preference": {
                      "type": "string",
                      "enum": [
                        "price",
                        "manual"
                      ]
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "electrical",
                        "mechanical"
                      ]
                    },
                    "parts": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true,
                        "required": [
                          "internal_part_number",
                          "part_id",
                          "manufacturer",
                          "manufacturer_part_number"
                        ],
                        "properties": {
                          "internal_part_number": {
                            "type": "string",
                            "example": "MFI-C1201804-708824"
                          },
                          "part_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "manufacturer": {
                            "type": "string",
                            "example": "TDK"
                          },
                          "manufacturer_part_number": {
                            "type": "string",
                            "example": "C3216X5R1V226M160AC"
                          },
                          "list_precedence": {
                            "type": "integer",
                            "example": 2
                          }
                        }
                      }
                    },
                    "created_timestamp": {
                      "type": "string",
                      "description": "UTC time, without a time zone suffix"
                    },
                    "created_by": {
                      "type": "string"
                    },
                    "updated_timestamp": {
                      "type": "string"
                    },
                    "updated_by": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The AVL does not exist, or you do not have access to it"
          }
        },
        "security": [
          {
            "apikeyHeader": []
          }
        ]
      },
      "parameters": [
        {
          "name": "approved_vendor_list_id",
          "in": "path",
          "required": true,
          "description": "The AVL's ID, such as a BOM line's `approved_vendor_list_id`",
          "schema": {
            "type": "string",
            "format": "uuid",
            "example": "48774583-95e5-42c7-ad5b-1815b0c22670"
          }
        }
      ]
    }
  },
  "components": {
    "securitySchemes": {
      "apikeyHeader": {
        "type": "apiKey",
        "name": "X-MacroFab-API-Key",
        "in": "header"
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 100,
      "1": 251,
      "2": 93,
      "3": 50,
      "4": 34,
      "5": 139,
      "6": 70,
      "7": 0,
      "8": 113,
      "9": 3,
      "10": 149,
      "11": 120
    }
  }
}
```