Skip to content

upsertSalesOrderLine

WRITE

Upsert sales order line.

POST /api/v1/sales/upsertSalesOrderLine
curl -X POST '<your-host>/api/v1/sales/upsertSalesOrderLine' \
  -H 'Authorization: Bearer <api-key>' \
  -H 'Content-Type: application/json' \
  -d '{
    "salesOrderId": "string",
    "salesOrderLineType": "Part",
    "locationId": "string",
    "taxPercent": 0
  }'
Response
{
  "id": "string"
}

Parameters

ParameterType
min length 0
min length 1
"Part""Service""Material""Tool""Consumable""Comment""Fixed Asset"
min 0max 1
"Purchase to Order""Pull from Inventory""Make to Order"

Input schema

schema
{
  "type": "object",
  "properties": {
    "salesOrderId": {
      "type": "string",
      "minLength": 1
    },
    "salesOrderLineType": {
      "type": "string",
      "enum": [
        "Part",
        "Service",
        "Material",
        "Tool",
        "Consumable",
        "Comment",
        "Fixed Asset"
      ]
    },
    "accountId": {
      "type": "string"
    },
    "shippingCost": {
      "type": "number"
    },
    "addOnCost": {
      "type": "number"
    },
    "nonTaxableAddOnCost": {
      "type": "number"
    },
    "assetId": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "itemId": {
      "type": "string"
    },
    "locationId": {
      "type": "string",
      "minLength": 0
    },
    "methodType": {
      "type": "string",
      "enum": [
        "Purchase to Order",
        "Pull from Inventory",
        "Make to Order"
      ]
    },
    "promisedDate": {
      "type": "string"
    },
    "saleQuantity": {
      "type": "number"
    },
    "serviceId": {
      "type": "string"
    },
    "setupPrice": {
      "type": "number"
    },
    "storageUnitId": {
      "type": "string"
    },
    "taxPercent": {
      "type": "number",
      "minimum": 0,
      "maximum": 1
    },
    "unitOfMeasureCode": {
      "type": "string"
    },
    "unitPrice": {
      "type": "number"
    },
    "exchangeRate": {
      "type": "number"
    },
    "customFields": {},
    "id": {
      "type": "string"
    }
  },
  "required": [
    "salesOrderId",
    "salesOrderLineType",
    "locationId",
    "taxPercent"
  ]
}