Skip to content

upsertCustomer

WRITE

Upsert customer.

POST /api/v1/sales/upsertCustomer
curl -X POST '<your-host>/api/v1/sales/upsertCustomer' \
  -H 'Authorization: Bearer <api-key>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "string",
    "taxPercent": 0,
    "_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
min 0max 1

Input schema

schema
{
  "type": "object",
  "properties": {
    "readableId": {
      "type": "string"
    },
    "name": {
      "type": "string",
      "minLength": 1
    },
    "customerStatusId": {
      "type": "string"
    },
    "customerTypeId": {
      "type": "string"
    },
    "accountManagerId": {
      "type": "string"
    },
    "currencyCode": {
      "type": "string"
    },
    "taxPercent": {
      "type": "number",
      "minimum": 0,
      "maximum": 1
    },
    "salesContactId": {
      "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",
    "taxPercent",
    "_operation"
  ]
}