Add Order Admin Note

This page describes the request data identifiers and response structure required to add an internal admin note to an order.

Data Identifier

{
  "dataID": "ADD_ORDER_ADMIN_NOTE",
  "order_key": "E477FEEBAABBCCDD208AFC505D20C022",
  "admin_note": "Customer asked for gift wrap.",
  "append": "Y"
}
KeyDescription
dataIDData identifier ADD_ORDER_ADMIN_NOTE
order_keyOrder key (recommended)
order_seqOrder number (when no order_key)
admin_noteNote text (required)
appendY appends to the note, otherwise replaces it

HTML

<form id="frm_add_order_admin_note">
  <input type="hidden" name="order_key" value="E477FEEBAABBCCDD208AFC505D20C022">
  <textarea name="admin_note" rows="3">Customer called to confirm the new address. Expedite hoodie.</textarea>
  <input type="checkbox" name="append" value="Y" checked=""> Append to existing note
  <button type="submit" class="btn btn-primary">Save note</button>
</form>

Response Result

{
  "result": true,
  "result_code": 200,
  "order_seq": 123
}
KeyDescription
resultSaved or not (true / false)
result_code200 on success
order_seqOrder number
  • Screen example: put a note box under the admin order detail and use append=Y to keep a log. Read it from order.admin_note in GET_ORDER and never show it on customer pages.
  • Error codes — errors also come back as HTTP 200. Check result:false, then error_code (string) and error_message.
  • 401 — Login required. Every order API needs a signed-in session.
  • 404 — Order not found. The order_key is wrong or the order was deleted.
  • 400 — Both order_key and order_seq are empty.
  • 400 — admin_note is empty (admin_note is required).

Example

Admin note

Order ORD-20261015-000123 · internal only

<script setup>
import { ref } from 'vue'
// Internal-only note (never shown to the customer). append='Y' adds to the existing note, else overwrites.
const note = ref('Customer called to confirm the new address. Expedite hoodie.')
const append = ref(true)
const msg = ref('')
async function save() {
  const { output } = await useNuxtApp().$connector({
    dataID: 'ADD_ORDER_ADMIN_NOTE', order_key: 'E477FEEBAABBCCDD208AFC505D20C022',
    admin_note: note.value, append: append.value ? 'Y' : 'N'
  })
  msg.value = output.result ? 'Note saved' : 'Save failed'
}
</script>

<template>
  <form class="card shadow-sm p-4" @submit.prevent="save">
    <h5 class="mb-1">Admin note</h5>
    <p class="text-secondary">Order ORD-20261015-000123 · internal only</p>
    <textarea class="form-control" rows="3" v-model="note"></textarea>
    <div class="form-check mt-2">
      <input class="form-check-input" type="checkbox" v-model="append" id="appendChk">
      <label class="form-check-label" for="appendChk">Append to existing note</label>
    </div>
    <button class="btn btn-primary mt-3">Save note</button>
    <p class="mt-2 text-success">{{ msg }}</p>
  </form>
</template>
<?php
$requestData = [
    'dataID'     => 'ADD_ORDER_ADMIN_NOTE',
    'order_key'  => 'E477FEEBAABBCCDD208AFC505D20C022',   // or 'order_seq' => 123
    'admin_note' => 'Customer called to confirm the new address. Expedite hoodie.',
    'append'     => 'Y',        // 'Y' appends to the existing note; otherwise it overwrites
];
$output = $connector->request($requestData);

echo $output['result'] ? 'Note saved on order #' . $output['order_seq'] : 'Save failed';