Skip to content

upsertPurchaseReturnOrderLine

WRITE

Upsert purchase return order line.

POST /api/v1/purchasing/upsertPurchaseReturnOrderLine
curl -X POST '<your-host>/api/v1/purchasing/upsertPurchaseReturnOrderLine' \
  -H 'Authorization: Bearer <api-key>' \
  -H 'Content-Type: application/json' \
  -d '{
    "purchaseReturnOrderId": "string",
    "itemId": "string",
    "quantity": 0,
    "unitPrice": 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 length 1
> 0
min 0
min 0max 1

Input schema

schema
{
  "type": "object",
  "properties": {
    "purchaseReturnOrderId": {
      "type": "string",
      "minLength": 1
    },
    "itemId": {
      "type": "string",
      "minLength": 1
    },
    "quantity": {
      "type": "number",
      "exclusiveMinimum": 0
    },
    "unitOfMeasureCode": {
      "type": "string"
    },
    "unitPrice": {
      "type": "number",
      "minimum": 0
    },
    "restockFeePercent": {
      "type": "number",
      "minimum": 0,
      "maximum": 1
    },
    "returnReasonId": {
      "type": "string"
    },
    "purchaseOrderLineId": {
      "type": "string"
    },
    "receiptLineId": {
      "type": "string"
    },
    "purchaseInvoiceLineId": {
      "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": [
    "purchaseReturnOrderId",
    "itemId",
    "quantity",
    "unitPrice",
    "_operation"
  ]
}