> For the complete documentation index, see [llms.txt](https://docs.pyck.cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pyck.cloud/graphql-api/mutations/createsupplier.md).

# Create Supplier

Create Supplier Mutation

Creates a new supplier entity in the system.

## Arguments

| Name    | Type                   | Description                          |
| ------- | ---------------------- | ------------------------------------ |
| `input` | `CreateSupplierInput!` | Input data for creating the supplier |

## Return Type

`Supplier` - The created supplier object.

## Input Fields

`CreateSupplierInput`:

| Field          | Type     | Description                  |
| -------------- | -------- | ---------------------------- |
| `dataTypeID`   | `UUID`   | Optional data type ID        |
| `dataTypeSlug` | `String` | Optional data type slug      |
| `data`         | `Map`    | Custom data for the supplier |

## Usage Example

```graphql
mutation {
  createSupplier(
    input: {
      dataTypeSlug: "domestic_supplier",
      data: {
        "name": "ACME Supply Co.",
        "code": "SUP-001",
        "email": "orders@acmesupply.com",
        "phone": "+1-555-0123",
        "address": {
          "street": "123 Industrial Way",
          "city": "Manufacturing City",
          "state": "CA",
          "zip": "90210",
          "country": "USA"
        },
        "contactPerson": "John Doe",
        "paymentTerms": "NET30",
        "leadTimeDays": 7,
        "minimumOrderValue": 500.00,
        "preferredDeliveryDays": ["Monday", "Wednesday", "Friday"],
        "certifications": ["ISO9001", "ISO14001"],
        "vendorRating": 4.5
      }
    }
  ) {
    id
    dataTypeSlug
    data
    createdAt
  }
}
```

```graphql
mutation {
  # Create an international supplier
  createSupplier(
    input: {
      dataTypeSlug: "international_supplier",
      data: {
        "name": "Global Components Ltd.",
        "code": "SUP-INT-001",
        "email": "sales@globalcomponents.com",
        "country": "China",
        "currency": "USD",
        "incoterms": "FOB",
        "leadTimeDays": 30,
        "minimumOrderQuantity": 1000,
        "paymentTerms": "LC",
        "customsClearanceRequired": true
      }
    }
  ) {
    id
    data
  }
}
```

## Common Data Fields

While the `data` field is flexible, common supplier attributes include:

* `name` - Supplier company name
* `code` - Unique supplier code
* `email` - Primary contact email
* `phone` - Contact phone number
* `address` - Supplier address object
* `contactPerson` - Primary contact name
* `paymentTerms` - Payment terms (NET30, COD, etc.)
* `leadTimeDays` - Standard lead time
* `minimumOrderValue` - Minimum order amount
* `certifications` - Quality certifications
* `vendorRating` - Supplier rating

## Notes

* The `data` field is completely flexible for custom attributes
* Use `dataTypeSlug` to categorize suppliers
* Consider creating virtual repositories named after suppliers for receiving
* Supplier codes should be unique within your system


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.pyck.cloud/graphql-api/mutations/createsupplier.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
