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

# Detach a vendor from a purchase order

> Requires ALL of the scopes purchaseorders.write, vendors.read.

Required scopes: `purchaseorders.write`, `vendors.read`.


## OpenAPI

````yaml DELETE /v1/purchase-orders/{purchaseOrderId}/vendors/{vendorId}
openapi: 3.1.0
info:
  title: PRINTOOLS API
  version: 1.0.0
  description: >-
    The PRINTOOLS public REST API. This document is generated from the live
    route table and service GraphQL SDL; do not edit it by hand.


    Every 2xx response has {status, message, data}. Every non-2xx response has
    {error, message, status: false}.


    Tenant credential: send X-API-Key only. It is bound to one shop.
    X-PrintTools-Organization-Id is optional for that credential and, if sent,
    must match its shop.


    Partner credential: send X-API-Key, X-API-Secret, Authorization: Bearer
    <Cognito access token>, and X-PrintTools-Organization-Id. The OAuth flow is
    documented at https://app.printools.io/api/index.html#partner-auth.


    Read live limits from GET /v1/reference/limits. Field shapes are projected
    from operation declarations; local endpoints have explicit handler-derived
    schemas.
servers:
  - url: https://api.printools.io
    description: Production
security: []
externalDocs:
  description: Getting started, OAuth and webhook guidance
  url: https://app.printools.io/api/index.html
paths:
  /v1/purchase-orders/{purchaseOrderId}/vendors/{vendorId}:
    delete:
      tags:
        - purchase-orders
      summary: Detach a vendor from a purchase order.
      description: Requires ALL of the scopes purchaseorders.write, vendors.read.
      operationId: delete_v1_purchase_orders_purchaseOrderId_vendors_vendorId
      parameters:
        - name: purchaseOrderId
          in: path
          required: true
          schema:
            type: string
            format: uuid
            example: 11111111-2222-3333-4444-555555555555
          description: UUID.
        - name: vendorId
          in: path
          required: true
          schema:
            type: string
            format: uuid
            example: 11111111-2222-3333-4444-555555555555
          description: UUID.
        - name: X-PrintTools-Organization-Id
          in: header
          required: false
          schema:
            type: string
            format: uuid
          description: >-
            Tenant credential: optional and, when sent, must equal the shop
            bound to the key. Partner credential: required; it selects an
            organisation the user previously authorised.
        - name: Idempotency-Key
          in: header
          required: false
          schema:
            type: string
            minLength: 1
            maxLength: 200
          description: >-
            Optional client-generated key for write retries. Reusing it with a
            different request returns 409; a replay includes
            Idempotency-Replayed: true.
      responses:
        '200':
          description: Successful response.
          headers:
            Idempotency-Replayed:
              description: >-
                Present and true when this response was replayed from a prior
                Idempotency-Key request.
              schema:
                type: string
                enum:
                  - 'true'
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Success'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/Output_PurchaseOrder'
        '400':
          description: >-
            Validation or request-shape error. Correct the request before
            retrying.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Credential authentication failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          headers:
            WWW-Authenticate:
              schema:
                type: string
                example: ApiKey
        '403':
          description: >-
            The credential lacks a required scope, or its actor lacks
            permission.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: The resource or endpoint was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: >-
            Conflict, including idempotency-key reuse or an in-flight idempotent
            request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '413':
          description: The JSON request body exceeds the published size limit.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limited. Retry after the returned delay.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          headers:
            Retry-After:
              description: Whole seconds to wait.
              schema:
                type: integer
                minimum: 0
        '500':
          description: An unexpected server error. A retry can be appropriate.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - tenantApiKey: []
        - partnerApiKey: []
          partnerApiSecret: []
          partnerBearer: []
      x-codeSamples:
        - lang: curl
          label: Tenant credential
          source: >-
            curl --request DELETE
            'https://api.printools.io/v1/purchase-orders/11111111-2222-3333-4444-555555555555/vendors/11111111-2222-3333-4444-555555555555'
            \
              --header 'X-API-Key: $PRINTOOLS_API_KEY'
components:
  schemas:
    Success:
      type: object
      required:
        - status
        - message
        - data
      properties:
        status:
          type: boolean
          description: >-
            The actual resolver result. It can be false when an operation
            returns false or null without throwing.
        message:
          type: string
          example: OK
        data: {}
      description: Every 2xx response uses this envelope.
    Output_PurchaseOrder:
      type: object
      properties:
        id:
          type: string
        poNumber:
          type: string
        title:
          type:
            - string
            - 'null'
        referenceNumber:
          type:
            - string
            - 'null'
        jobId:
          type:
            - string
            - 'null'
        quoteId:
          type:
            - string
            - 'null'
        deadline:
          type:
            - string
            - 'null'
          format: date
        subtotalExGst:
          type: number
        taxRatePct:
          type: number
        gstAmount:
          type: number
        totalIncGst:
          type: number
        status:
          $ref: '#/components/schemas/Enum_POStatus'
        sentStatus:
          $ref: '#/components/schemas/Enum_POSentStatus'
        isActive:
          type: boolean
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        lineItems:
          type: array
          items:
            $ref: '#/components/schemas/Output_PurchaseOrderLineItem'
        vendors:
          type: array
          items:
            $ref: '#/components/schemas/Output_Vendor'
      required:
        - id
        - poNumber
        - subtotalExGst
        - taxRatePct
        - gstAmount
        - totalIncGst
        - status
        - sentStatus
        - isActive
        - createdAt
        - updatedAt
        - lineItems
        - vendors
    Error:
      type: object
      required:
        - error
        - message
        - status
      properties:
        error:
          type: string
          description: Stable machine-readable error code.
        message:
          type: string
        status:
          type: boolean
          const: false
      description: Every non-2xx response uses this envelope.
    Enum_POStatus:
      type: string
      enum:
        - Draft
        - Pending
        - Approved
        - Sent
        - PartiallyReceived
        - Received
        - Completed
        - Cancelled
    Enum_POSentStatus:
      type: string
      enum:
        - NotSent
        - Sent
        - Delivered
        - Confirmed
    Output_PurchaseOrderLineItem:
      type: object
      properties:
        id:
          type: string
        purchaseOrderId:
          type: string
        itemType:
          $ref: '#/components/schemas/Enum_POLineItemType'
        code:
          type:
            - string
            - 'null'
        name:
          type: string
        description:
          type:
            - string
            - 'null'
        colour:
          type:
            - string
            - 'null'
        size:
          type:
            - string
            - 'null'
        quantity:
          type: integer
        rate:
          type: number
        ordered:
          type: boolean
        quantityOrdered:
          type:
            - integer
            - 'null'
        quantityOnBackorder:
          type:
            - integer
            - 'null'
        backorderDate:
          type:
            - string
            - 'null'
          format: date
        received:
          type: boolean
        notes:
          type:
            - string
            - 'null'
        subtotal:
          type: number
        sortOrder:
          type: integer
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
        - id
        - purchaseOrderId
        - itemType
        - name
        - quantity
        - rate
        - ordered
        - received
        - subtotal
        - sortOrder
        - createdAt
        - updatedAt
    Output_Vendor:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        kind:
          $ref: '#/components/schemas/Enum_VendorKind'
        serviceTypes:
          type: array
          items:
            $ref: '#/components/schemas/Enum_VendorServiceType'
        logoUrl:
          type:
            - string
            - 'null'
        ordersWebsite:
          type:
            - string
            - 'null'
        accountNumber:
          type:
            - string
            - 'null'
        defaultLeadTimeDays:
          type:
            - integer
            - 'null'
        minimumOrder:
          type:
            - number
            - 'null'
        proximityNotes:
          type:
            - string
            - 'null'
        notes:
          type:
            - string
            - 'null'
        isActive:
          type: boolean
        isManaged:
          type: boolean
          description: >-
            True when PrinTools provisions this vendor rather than the shop
            creating it

            — currently only the AS Colour record every org is seeded with, and
            which the

            garment catalogue links its AS Colour styles to. A managed vendor is
            edited

            like any other (the account number, contacts and addresses on it are
            the

            shop's own), but it cannot be archived: the catalogue's link to it
            ignores

            `isActive`, so archiving would hide nothing and only break purchase
            orders

            for every AS Colour style.
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        contacts:
          type: array
          items:
            $ref: '#/components/schemas/Output_VendorContact'
        addresses:
          type: array
          items:
            $ref: '#/components/schemas/Output_VendorAddress'
      required:
        - id
        - name
        - kind
        - serviceTypes
        - isActive
        - isManaged
        - createdAt
        - updatedAt
        - contacts
        - addresses
    Enum_POLineItemType:
      type: string
      enum:
        - Product
        - Decoration
        - Other
    Enum_VendorKind:
      type: string
      enum:
        - InventorySupplier
        - OutsourceVendor
        - Both
    Enum_VendorServiceType:
      type: string
      enum:
        - ScreenPrint
        - Embroidery
        - Digitising
        - DTF
        - Other
    Output_VendorContact:
      type: object
      properties:
        id:
          type: string
        vendorId:
          type: string
        firstName:
          type:
            - string
            - 'null'
        lastName:
          type:
            - string
            - 'null'
        email:
          type:
            - string
            - 'null'
        phone:
          type:
            - string
            - 'null'
        role:
          type:
            - string
            - 'null'
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
        - id
        - vendorId
        - createdAt
        - updatedAt
    Output_VendorAddress:
      type: object
      properties:
        id:
          type: string
        vendorId:
          type: string
        label:
          type:
            - string
            - 'null'
        street:
          type:
            - string
            - 'null'
        city:
          type:
            - string
            - 'null'
        state:
          type:
            - string
            - 'null'
        postcode:
          type:
            - string
            - 'null'
        country:
          type:
            - string
            - 'null'
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
        - id
        - vendorId
        - createdAt
        - updatedAt
  securitySchemes:
    tenantApiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: Tenant credential. This is sufficient by itself.
    partnerApiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: Partner application client ID.
    partnerApiSecret:
      type: apiKey
      in: header
      name: X-API-Secret
      description: Partner application secret.
    partnerBearer:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Cognito access token obtained through OAuth.

````