Skip to content

upsertSupplier

WRITE

Upsert supplier.

POST /api/v1/purchasing/upsertSupplier
curl -X POST '<your-host>/api/v1/purchasing/upsertSupplier' \
  -H 'Authorization: Bearer <api-key>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "string",
    "_operation": "create"
  }'
Response
{
  "id": "string"
}

Parameters

ParameterType

Required. 'create' inserts a new record, 'update' modifies the existing record with this id.

"create""update"
min length 1

Input schema

schema
{
  "type": "object",
  "properties": {
    "readableId": {
      "type": "string"
    },
    "name": {
      "type": "string",
      "minLength": 1
    },
    "supplierStatus": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "Active",
            "Inactive",
            "Pending",
            "Rejected"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "supplierTypeId": {
      "type": "string"
    },
    "accountManagerId": {
      "type": "string"
    },
    "currencyCode": {
      "type": "string"
    },
    "purchasingContactId": {
      "type": "string"
    },
    "website": {
      "type": "string"
    },
    "customFields": {},
    "id": {
      "type": "string"
    },
    "_operation": {
      "type": "string",
      "enum": [
        "create",
        "update"
      ],
      "description": "Required. 'create' inserts a new record, 'update' modifies the existing record with this id."
    }
  },
  "required": [
    "name",
    "_operation"
  ]
}