Opply Buyer Documents API

The Buyer Documents API from Opply — 6 operation(s) for buyer documents.

Operations 10

GET /api/v1/companies/buyer-documents/ List buyer documents #
POST /api/v1/companies/buyer-documents/ Upload buyer document #
GET /api/v1/companies/buyer-documents/{uuid}/ Retrieve buyer document #
PUT /api/v1/companies/buyer-documents/{uuid}/ Update buyer document #
PATCH /api/v1/companies/buyer-documents/{uuid}/ Partial update buyer document #
DELETE /api/v1/companies/buyer-documents/{uuid}/ Delete buyer document #
GET /api/v1/companies/buyer-documents/types-facet/ List document types present on the buyer's documents #
GET /api/v1/companies/buyer-supplier-documents/ List supplier documents for buyer #
GET /api/v1/companies/buyer-supplier-documents/{uuid}/ Retrieve supplier document (buyer view) #
GET /api/v1/companies/buyer-supplier-documents/types-facet/ List document types present on supplier documents visible to the buyer #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/opply-buyer-documents-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

opply-buyer-documents-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Opply Activity Feed Buyer Documents API
  version: 0.0.0
servers:
- url: https://api.opply.com
  description: Base URL declared by the provider in apis.yml (roadmap#122).
tags:
- name: Buyer Documents
paths:
  /api/v1/companies/buyer-documents/:
    get:
      operationId: api_v1_companies_buyer_documents_list
      description: Returns all certification documents for the current buyer company.
      summary: List buyer documents
      parameters:
      - in: query
        name: is_archived
        schema:
          type: boolean
        description: Filter by computed `is_archived` (active vs archived sub-tab).
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      - name: page
        required: false
        in: query
        description: A page number within the paginated result set.
        schema:
          type: integer
      - name: page_size
        required: false
        in: query
        description: Number of results to return per page.
        schema:
          type: integer
      - name: search
        required: false
        in: query
        description: A search term.
        schema:
          type: string
      - in: query
        name: status
        schema:
          type: string
          enum:
          - expired
          - expiring_soon
          - renewed
          - valid
        description: Filter by computed lifecycle status.
      - in: query
        name: type_uuid__in
        schema:
          type: string
        description: Filter by comma-separated document type UUIDs.
      tags:
      - Buyer Documents
      security:
      - tokenAuth: []
      - cookieAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedBuyerDocumentList'
          description: ''
    post:
      operationId: api_v1_companies_buyer_documents_create
      description: Upload a new certification document (BRCGS, organic cert, ISO 9001, etc.).
      summary: Upload buyer document
      tags:
      - Buyer Documents
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BuyerDocument'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/BuyerDocument'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/BuyerDocument'
        required: true
      security:
      - tokenAuth: []
      - cookieAuth: []
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BuyerDocument'
          description: ''
  /api/v1/companies/buyer-documents/{uuid}/:
    get:
      operationId: api_v1_companies_buyer_documents_retrieve
      description: Returns details for a specific buyer certification document.
      summary: Retrieve buyer document
      parameters:
      - in: path
        name: uuid
        schema:
          type: string
        required: true
      tags:
      - Buyer Documents
      security:
      - tokenAuth: []
      - cookieAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BuyerDocument'
          description: ''
    put:
      operationId: api_v1_companies_buyer_documents_update
      description: Update all fields of an existing buyer document.
      summary: Update buyer document
      parameters:
      - in: path
        name: uuid
        schema:
          type: string
        required: true
      tags:
      - Buyer Documents
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BuyerDocument'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/BuyerDocument'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/BuyerDocument'
        required: true
      security:
      - tokenAuth: []
      - cookieAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BuyerDocument'
          description: ''
    patch:
      operationId: api_v1_companies_buyer_documents_partial_update
      description: Update specific fields of an existing buyer document.
      summary: Partial update buyer document
      parameters:
      - in: path
        name: uuid
        schema:
          type: string
        required: true
      tags:
      - Buyer Documents
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedBuyerDocument'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedBuyerDocument'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedBuyerDocument'
      security:
      - tokenAuth: []
      - cookieAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BuyerDocument'
          description: ''
    delete:
      operationId: api_v1_companies_buyer_documents_destroy
      description: Permanently delete a buyer document.
      summary: Delete buyer document
      parameters:
      - in: path
        name: uuid
        schema:
          type: string
        required: true
      tags:
      - Buyer Documents
      security:
      - tokenAuth: []
      - cookieAuth: []
      responses:
        '204':
          description: No response body
  /api/v1/companies/buyer-documents/types-facet/:
    get:
      operationId: api_v1_companies_buyer_documents_types_facet_list
      description: Returns the distinct `DocumentType`s that have at least one BuyerDocument for the current brand. Used by the FE filter dropdown so it only offers types the user can actually narrow to.
      summary: List document types present on the buyer's documents
      parameters:
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      - name: search
        required: false
        in: query
        description: A search term.
        schema:
          type: string
      tags:
      - Buyer Documents
      security:
      - tokenAuth: []
      - cookieAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/DocumentType'
          description: ''
  /api/v1/companies/buyer-supplier-documents/:
    get:
      operationId: api_v1_companies_buyer_supplier_documents_list
      description: Returns all supplier certification documents visible to the current buyer. Includes documents from all suppliers the buyer has a referral relationship with. Supplier-wide documents (no buyer assigned) and buyer-specific documents are included.
      summary: List supplier documents for buyer
      parameters:
      - in: query
        name: is_archived
        schema:
          type: boolean
        description: Filter by computed `is_archived` (active vs archived sub-tab).
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      - name: page
        required: false
        in: query
        description: A page number within the paginated result set.
        schema:
          type: integer
      - name: page_size
        required: false
        in: query
        description: Number of results to return per page.
        schema:
          type: integer
      - name: search
        required: false
        in: query
        description: A search term.
        schema:
          type: string
      - in: query
        name: site_uuid__in
        schema:
          type: string
        description: Filter by comma-separated supplier site UUIDs.
      - in: query
        name: status
        schema:
          type: string
          enum:
          - expired
          - expiring_soon
          - renewed
          - valid
        description: Filter by computed lifecycle status.
      - in: query
        name: supplier_uuid
        schema:
          type: string
          format: uuid
        description: Filter by supplier company UUID.
      - in: query
        name: supplier_uuid__in
        schema:
          type: string
        description: Filter by comma-separated supplier company UUIDs.
      - in: query
        name: type_uuid__in
        schema:
          type: string
        description: Filter by comma-separated document type UUIDs.
      tags:
      - Buyer Documents
      security:
      - tokenAuth: []
      - cookieAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedSupplierDocumentList'
          description: ''
  /api/v1/companies/buyer-supplier-documents/{uuid}/:
    get:
      operationId: api_v1_companies_buyer_supplier_documents_retrieve
      description: Returns details for a specific supplier document.
      summary: Retrieve supplier document (buyer view)
      parameters:
      - in: path
        name: uuid
        schema:
          type: string
        required: true
      tags:
      - Buyer Documents
      security:
      - tokenAuth: []
      - cookieAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SupplierDocument'
          description: ''
  /api/v1/companies/buyer-supplier-documents/types-facet/:
    get:
      operationId: api_v1_companies_buyer_supplier_documents_types_facet_list
      description: Returns the distinct `DocumentType`s that have at least one SupplierDocument visible to the current brand (via REGISTERED referral). Used by the FE filter dropdown so it only offers types the user can actually narrow to.
      summary: List document types present on supplier documents visible to the buyer
      parameters:
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      - name: search
        required: false
        in: query
        description: A search term.
        schema:
          type: string
      tags:
      - Buyer Documents
      security:
      - tokenAuth: []
      - cookieAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/DocumentType'
          description: ''
components:
  schemas:
    PatchedBuyerDocument:
      type: object
      description: 'Serializer for BuyerDocument — buyer certification and compliance documents.


        Handles CRUD with computed status fields, mirroring OpplyDocumentSerializer.'
      properties:
        uuid:
          type: string
          format: uuid
          readOnly: true
        type:
          allOf:
          - $ref: '#/components/schemas/DocumentType'
          readOnly: true
        type_uuid:
          type: string
          format: uuid
          writeOnly: true
        renewing_uuid:
          type:
          - string
          - 'null'
          format: uuid
          writeOnly: true
        file:
          type: string
          format: uri
          description: The uploaded document file
        name:
          type: string
          description: Display name for the document
          maxLength: 255
        start_date:
          type:
          - string
          - 'null'
          format: date
          description: Start date of document validity
        end_date:
          type:
          - string
          - 'null'
          format: date
          description: End/expiry date of document validity
        countries:
          type: array
          items:
            $ref: '#/components/schemas/Country'
          description: ISO country codes this document applies to. Empty = all countries.
        certificate_number:
          type: string
          description: Permit / exemption / certificate number as printed on the document
          maxLength: 128
        jurisdiction:
          type: string
          description: State/region the document applies in, as printed on the document (e.g. 'Michigan'). For US documents the structured counterpart is us_state_jurisdiction.
          maxLength: 128
        us_state_jurisdiction:
          description: 'US state/territory this document applies in (USPS code, e.g. ''MI''). Structured counterpart of the free-text jurisdiction for US documents.


            * `AL` - Alabama

            * `AK` - Alaska

            * `AZ` - Arizona

            * `AR` - Arkansas

            * `CA` - California

            * `CO` - Colorado

            * `CT` - Connecticut

            * `DE` - Delaware

            * `FL` - Florida

            * `GA` - Georgia

            * `HI` - Hawaii

            * `ID` - Idaho

            * `IL` - Illinois

            * `IN` - Indiana

            * `IA` - Iowa

            * `KS` - Kansas

            * `KY` - Kentucky

            * `LA` - Louisiana

            * `ME` - Maine

            * `MD` - Maryland

            * `MA` - Massachusetts

            * `MI` - Michigan

            * `MN` - Minnesota

            * `MS` - Mississippi

            * `MO` - Missouri

            * `MT` - Montana

            * `NE` - Nebraska

            * `NV` - Nevada

            * `NH` - New Hampshire

            * `NJ` - New Jersey

            * `NM` - New Mexico

            * `NY` - New York

            * `NC` - North Carolina

            * `ND` - North Dakota

            * `OH` - Ohio

            * `OK` - Oklahoma

            * `OR` - Oregon

            * `PA` - Pennsylvania

            * `RI` - Rhode Island

            * `SC` - South Carolina

            * `SD` - South Dakota

            * `TN` - Tennessee

            * `TX` - Texas

            * `UT` - Utah

            * `VT` - Vermont

            * `VA` - Virginia

            * `WA` - Washington

            * `WV` - West Virginia

            * `WI` - Wisconsin

            * `WY` - Wyoming

            * `DC` - District of Columbia

            * `PR` - Puerto Rico

            * `GU` - Guam

            * `VI` - U.S. Virgin Islands

            * `AS` - American Samoa

            * `MP` - Northern Mariana Islands'
          oneOf:
          - $ref: '#/components/schemas/USStateEnum'
          - $ref: '#/components/schemas/BlankEnum'
        issuing_authority:
          type: string
          description: Body that issued the document (e.g. 'Michigan Department of Treasury')
          maxLength: 255
        holder_name:
          type: string
          description: Entity the document is issued to as printed — normally the buyer company
          maxLength: 255
        notes:
          type:
          - string
          - 'null'
          description: Optional notes about this document
          maxLength: 2048
        status:
          allOf:
          - $ref: '#/components/schemas/DocumentLifecycleStatusEnum'
          readOnly: true
        is_archived:
          type: boolean
          description: Return whether the document is archived (expired or renewed).
          readOnly: true
        superseded_by_uuid:
          type:
          - string
          - 'null'
          format: uuid
          readOnly: true
        created:
          type: string
          format: date-time
          readOnly: true
        modified:
          type: string
          format: date-time
          readOnly: true
    DocumentLifecycleStatusEnum:
      enum:
      - valid
      - expired
      - expiring_soon
      - renewed
      type: string
      description: '* `valid` - Valid

        * `expired` - Expired

        * `expiring_soon` - Expiring Soon

        * `renewed` - Renewed'
    SupplierSite:
      type: object
      properties:
        uuid:
          type: string
          format: uuid
          readOnly: true
        name:
          type: string
          maxLength: 255
        company:
          type: integer
      required:
      - company
      - name
      - uuid
    BlankEnum:
      enum:
      - ''
    Country:
      enum:
      - AF
      - AX
      - AL
      - DZ
      - AS
      - AD
      - AO
      - AI
      - AQ
      - AG
      - AR
      - AM
      - AW
      - AU
      - AT
      - AZ
      - BS
      - BH
      - BD
      - BB
      - BY
      - BE
      - BZ
      - BJ
      - BM
      - BT
      - BO
      - BQ
      - BA
      - BW
      - BV
      - BR
      - IO
      - BN
      - BG
      - BF
      - BI
      - CV
      - KH
      - CM
      - CA
      - KY
      - CF
      - TD
      - CL
      - CN
      - CX
      - CC
      - CO
      - KM
      - CG
      - CD
      - CK
      - CR
      - CI
      - HR
      - CU
      - CW
      - CY
      - CZ
      - DK
      - DJ
      - DM
      - DO
      - EC
      - EG
      - SV
      - GQ
      - ER
      - EE
      - SZ
      - ET
      - FK
      - FO
      - FJ
      - FI
      - FR
      - GF
      - PF
      - TF
      - GA
      - GM
      - GE
      - DE
      - GH
      - GI
      - GR
      - GL
      - GD
      - GP
      - GU
      - GT
      - GG
      - GN
      - GW
      - GY
      - HT
      - HM
      - VA
      - HN
      - HK
      - HU
      - IS
      - IN
      - ID
      - IR
      - IQ
      - IE
      - IM
      - IL
      - IT
      - JM
      - JP
      - JE
      - JO
      - KZ
      - KE
      - KI
      - KW
      - KG
      - LA
      - LV
      - LB
      - LS
      - LR
      - LY
      - LI
      - LT
      - LU
      - MO
      - MG
      - MW
      - MY
      - MV
      - ML
      - MT
      - MH
      - MQ
      - MR
      - MU
      - YT
      - MX
      - FM
      - MD
      - MC
      - MN
      - ME
      - MS
      - MA
      - MZ
      - MM
      - NA
      - NR
      - NP
      - NL
      - NC
      - NZ
      - NI
      - NE
      - NG
      - NU
      - NF
      - KP
      - MK
      - XI
      - MP
      - 'NO'
      - OM
      - PK
      - PW
      - PS
      - PA
      - PG
      - PY
      - PE
      - PH
      - PN
      - PL
      - PT
      - PR
      - QA
      - RE
      - RO
      - RU
      - RW
      - BL
      - SH
      - KN
      - LC
      - MF
      - PM
      - VC
      - WS
      - SM
      - ST
      - SA
      - SN
      - RS
      - SC
      - SL
      - SG
      - SX
      - SK
      - SI
      - SB
      - SO
      - ZA
      - GS
      - KR
      - SS
      - ES
      - LK
      - SD
      - SR
      - SJ
      - SE
      - CH
      - SY
      - TW
      - TJ
      - TZ
      - TH
      - TL
      - TG
      - TK
      - TO
      - TT
      - TN
      - TR
      - TM
      - TC
      - TV
      - UG
      - UA
      - AE
      - GB
      - UM
      - US
      - UY
      - UZ
      - VU
      - VE
      - VN
      - VG
      - VI
      - WF
      - EH
      - YE
      - ZM
      - ZW
      type: string
      description: '* `AF` - Afghanistan

        * `AX` - Åland Islands

        * `AL` - Albania

        * `DZ` - Algeria

        * `AS` - American Samoa

        * `AD` - Andorra

        * `AO` - Angola

        * `AI` - Anguilla

        * `AQ` - Antarctica

        * `AG` - Antigua and Barbuda

        * `AR` - Argentina

        * `AM` - Armenia

        * `AW` - Aruba

        * `AU` - Australia

        * `AT` - Austria

        * `AZ` - Azerbaijan

        * `BS` - Bahamas

        * `BH` - Bahrain

        * `BD` - Bangladesh

        * `BB` - Barbados

        * `BY` - Belarus

        * `BE` - Belgium

        * `BZ` - Belize

        * `BJ` - Benin

        * `BM` - Bermuda

        * `BT` - Bhutan

        * `BO` - Bolivia

        * `BQ` - Bonaire, Sint Eustatius and Saba

        * `BA` - Bosnia and Herzegovina

        * `BW` - Botswana

        * `BV` - Bouvet Island

        * `BR` - Brazil

        * `IO` - British Indian Ocean Territory

        * `BN` - Brunei

        * `BG` - Bulgaria

        * `BF` - Burkina Faso

        * `BI` - Burundi

        * `CV` - Cabo Verde

        * `KH` - Cambodia

        * `CM` - Cameroon

        * `CA` - Canada

        * `KY` - Cayman Islands

        * `CF` - Central African Republic

        * `TD` - Chad

        * `CL` - Chile

        * `CN` - China

        * `CX` - Christmas Island

        * `CC` - Cocos (Keeling) Islands

        * `CO` - Colombia

        * `KM` - Comoros

        * `CG` - Congo

        * `CD` - Congo (the Democratic Republic of the)

        * `CK` - Cook Islands

        * `CR` - Costa Rica

        * `CI` - Côte d''Ivoire

        * `HR` - Croatia

        * `CU` - Cuba

        * `CW` - Curaçao

        * `CY` - Cyprus

        * `CZ` - Czechia

        * `DK` - Denmark

        * `DJ` - Djibouti

        * `DM` - Dominica

        * `DO` - Dominican Republic

        * `EC` - Ecuador

        * `EG` - Egypt

        * `SV` - El Salvador

        * `GQ` - Equatorial Guinea

        * `ER` - Eritrea

        * `EE` - Estonia

        * `SZ` - Eswatini

        * `ET` - Ethiopia

        * `FK` - Falkland Islands (Malvinas)

        * `FO` - Faroe Islands

        * `FJ` - Fiji

        * `FI` - Finland

        * `FR` - France

        * `GF` - French Guiana

        * `PF` - French Polynesia

        * `TF` - French Southern Territories

        * `GA` - Gabon

        * `GM` - Gambia

        * `GE` - Georgia

        * `DE` - Germany

        * `GH` - Ghana

        * `GI` - Gibraltar

        * `GR` - Greece

        * `GL` - Greenland

        * `GD` - Grenada

        * `GP` - Guadeloupe

        * `GU` - Guam

        * `GT` - Guatemala

        * `GG` - Guernsey

        * `GN` - Guinea

        * `GW` - Guinea-Bissau

        * `GY` - Guyana

        * `HT` - Haiti

        * `HM` - Heard Island and McDonald Islands

        * `VA` - Holy See

        * `HN` - Honduras

        * `HK` - Hong Kong

        * `HU` - Hungary

        * `IS` - Iceland

        * `IN` - India

        * `ID` - Indonesia

        * `IR` - Iran

        * `IQ` - Iraq

        * `IE` - Ireland

        * `IM` - Isle of Man

        * `IL` - Israel

        * `IT` - Italy

        * `JM` - Jamaica

        * `JP` - Japan

        * `JE` - Jersey

        * `JO` - Jordan

        * `KZ` - Kazakhstan

        * `KE` - Kenya

        * `KI` - Kiribati

        * `KW` - Kuwait

        * `KG` - Kyrgyzstan

        * `LA` - Laos

        * `LV` - Latvia

        * `LB` - Lebanon

        * `LS` - Lesotho

        * `LR` - Liberia

        * `LY` - Libya

        * `LI` - Liechtenstein

        * `LT` - Lithuania

        * `LU` - Luxembourg

        * `MO` - Macao

        * `MG` - Madagascar

        * `MW` - Malawi

        * `MY` - Malaysia

        * `MV` - Maldives

        * `ML` - Mali

        * `MT` - Malta

        * `MH` - Marshall Islands

        * `MQ` - Martinique

        * `MR` - Mauritania

        * `MU` - Mauritius

        * `YT` - Mayotte

        * `MX` - Mexico

        * `FM` - Micronesia

        * `MD` - Moldova

        * `MC` - Monaco

        * `MN` - Mongolia

        * `ME` - Montenegro

        * `MS` - Montserrat

        * `MA` - Morocco

        * `MZ` - Mozambique

        * `MM` - Myanmar

        * `NA` - Namibia

        * `NR` - Nauru

        * `NP` - Nepal

        * `NL` - Netherlands

        * `NC` - New Caledonia

        * `NZ` - New Zealand

        * `NI` - Nicaragua

        * `NE` - Niger

        * `NG` - Nigeria

        * `NU` - Niue

        * `NF` - Norfolk Island

        * `KP` - North Korea

        * `MK` - North Macedonia

        * `XI` - Northern Ireland

        * `MP` - Northern Mariana Islands

        * `NO` - Norway

        * `OM` - Oman

        * `PK` - Pakistan

        * `PW` - Palau

        * `PS` - Palestine, State of

        * `PA` - Panama

        * `PG` - Papua New Guinea

        * `PY` - Paraguay

        * `PE` - Peru

        * `PH` - Philippines

        * `PN` - Pitcairn

        * `PL` - Poland

        * `PT` - Portugal

        * `PR` - Puerto Rico

        * `QA` - Qatar

        * `RE` - Réunion

        * `RO` - Romania

        * `RU` - Russia

        * `RW` - Rwanda

        * `BL` - Saint Barthélemy

        * `SH` - Saint Helena, Ascension and Tristan da Cunha

        * `KN` - Saint Kitts and Nevis

        * `LC` - Saint Lucia

        * `MF` - Saint Martin (French part)

        * `PM` - Saint Pierre and Miquelon

        * `VC` - Saint Vincent and the Grenadines

        * `WS` - Samoa

        * `SM` - San Marino

        * `ST` - Sao Tome and Principe

        * `SA` - Saudi Arabia

        * `SN` - Senegal

        * `RS` - Serbia

        * `SC` - Seychelles

        * `SL` - Sierra Leone

        * `SG` - Singapore

        * `SX` - Sint Maarten (Dutch part)

        * `SK` - Slovakia

        * `SI` - Slovenia

        * `SB` - Solomon Islands

        * `SO` - Somalia

        * `ZA` - South Africa

        * `GS` - South Georgia and the South Sandwich Islands

        * `KR` - South Korea

        * `SS` - South Sudan

        * `ES` - Spain

        * `LK` - Sri Lanka

        * `SD` - Sudan

        * `SR` - Suriname

        * `SJ` - Svalbard and Jan Mayen

        * `SE` - Sweden

        * `CH` - Switzerland

        * `SY` - Syria

        * `TW` - Taiwan

        * `TJ` - Tajikistan

        * `TZ` - Tanzania

        * `TH` - Thailand

        * `TL` - Timor-Leste

        * `TG` - Togo

        * `TK` - Tokelau

        * `TO` - Tonga

        * `TT` - Trinidad and Tobago

        * `TN` - Tunisia

        * `TR` - Türkiye

        * `TM` - Turkmenistan

        * `TC` - Turks and Caicos Islands

        * `TV` - Tuvalu

        * `UG` - Uganda

        * `UA` - Ukraine

        * `AE` - United Arab Emirates

        * `GB` - United Kingdom

        * `UM` - United States Minor Outlying Islands

        * `US` - United States of America

        * `UY` - Uruguay

        * `UZ` - Uzbekistan

        * `VU` - Vanuatu

        * `VE` - Venezuela

        * `VN` - Vietnam

        * `VG` - Virgin Islands (British)

        * `VI` - Virgin Islands (U.S.)

        * `WF` - Wallis and Futuna

        * `EH` - Western Sahara

        * `YE` - Yemen

        * `ZM` - Zambia

        * `ZW` - Zimbabwe'
    SupplierDocument:
      type: object
      properties:
        uuid:
          type: string
          format: uuid
          readOnly: true
        company:
          type: integer
          readOnly: true
        supplier_uuid:
          type: string
          format: uuid
          readOnly: true
        supplier_name:
          type: string
          readOnly: true
        type:
          allOf:
          - $ref: '#/components/schemas/DocumentType'
          readOnly: true
        type_uuid:
          type: string
          format: uuid
          writeOnly: true
        renewing_uuid:
          type:
          - string
          - 'null'
          format: uuid
          writeOnly: true
        site:
          allOf:
          - $ref: '#/components/schemas/SupplierSite'
          readOnly: true
        site_uuid:
          type:
          - string
          - 'null'
          format: uuid
          writeOnly: true
        site_name:
          type: string
          writeOnly: true
          description: Address/site name - auto-creates SupplierSite if not exists (SC-2293)
        buyer_uuid:
          type:
          - string
          - 'null'
          format: uuid
          writeOnly: true
          description: Buyer company UUID (optional)
        buyer_name:
          type:
          - string
          - 'null'
          description: Return the buyer company name if assigned.
          readOnly: true
        url:
          type: string
          format: uri
        start_date:
          type:
          - string
          - 'null'
          format: date
        end_date:
          type:
          - string
          - 'null'
          format: date
        notes:
          type:
          - string
          - 'null'
          maxLength: 2048
        status:
          allOf:
          - $ref: '#/components/schemas/DocumentLifecycleStatusEnum'
          readOnly: true
        is_archived:
          type: boolean
          description: Return whether the document is archived.
          readOnly: true
        superseded_by_uuid:
          type:
          - string
          - 'null'
          format: uuid
          readOnly: true
      required:
      - buyer_name
      - company
      - is_archived
      - site
      - status
      - superseded_by_uuid
      - supplier_name
      - supplier_uuid
      - type
      - url
      - uuid
    USStateEnum:
      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
      - PR
      - GU
      - VI
      - AS
      - MP
      type: string
      description: '* `AL` - Alabama

        * `AK` - Alaska

        * `AZ` - Arizona

        * `AR` - Arkansas

        * `CA` - California

        * `CO` - Colorado

        * `CT` - Connecticut

        * `DE` - Delaware

        * `FL` - Florida

        * `GA` - Georgia

        * `HI` - Hawaii

        * `ID` - Idaho

        * `IL` - Illinois

        * `IN` - Indiana

        * `IA` - Iowa

        * `KS` - Kansas

        * `KY` - Kentucky

        * `LA` - Louisiana

        * `ME` - Maine

        * `MD` - Maryland

        * `MA` - Massachusetts

        * `MI` - Michigan

        * `MN` - Minnesota

        * `MS` - Mississippi

        * `MO` - Missouri

        * `MT` - Montana

        * `NE` - Nebraska

        * `NV` - Nevada

        * `NH` - New Hampshire

        * `NJ` - New Jersey

        * `NM` - New Mexico

        * `NY` - New York

        * `NC` - North Carolina

        * `ND` - North Dakota

        * `OH` - Ohio

        * `OK` - Oklahoma

        * `OR` - Oregon

        * `PA` - Pennsylvania

        * `RI` - Rhode Island

        * `SC` - South Carolina

        * `SD` - South Dakota

        * `TN` - Tennessee

        * `TX` - Texas

        * `UT` - Utah

        * `VT` - Vermont

        * `VA` - Virginia

        * `WA` - Washington

        * `WV` - West Virginia

        * `WI` - Wisconsin

        * `WY` - Wyoming

        * `DC` - District of Columbia

        * `PR` - Puerto Rico

        * `GU` - Guam

        * `VI` - U.S. Virgin Islands

        * `AS` - American Samoa

        * `MP` - Northern Mariana Islands'
    BuyerDocument:
      type: object
      description: 'Serializer for BuyerDocument — buyer certification and compliance documents.


        Handles CRUD with computed status fields, mirroring OpplyDocumentSerializer.'
      properties:
        uuid:
          type: string
          format: uuid
          readOnly: true
        type:
          allOf:
          - $ref: '#/components/schemas/DocumentType'
          readOnly: true
        type_uuid:
          type: string
          format: uuid
          writeOnly: true
        renewing_uuid:
          type:
          - string
          - 'null'
          format: uuid
          writeOnly: true
        file:
          type: string
          format: uri
          description: The uploaded document file
        name:
          type: string
          description: Display name for the document
          maxLength: 255
        start_date:
          type:
          - string
          - 'null'
          format: date
          description: Start date of document validity
        end_date:
          type:
          - string
          - 'null'
          format: date
          description: End/expiry date of do

# --- truncated at 32 KB (37 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/opply/refs/heads/main/openapi/opply-buyer-documents-api-openapi.yml