Order notes


Overview

The order notes API allows you to create, view, and delete individual order notes. Order notes are added by administrators and programmatically to store data about an order, or order events.


Create a order note

This API helps you to create a new note for an order.

createOrderNote({})

Parameters

@required int id,
Map<String, dynamic> data,

API Call

// CONFIG FOR WOOSIGNAL
var wsConfig = {
"appKey":"your app key",
"debugMode":true
};

// CREATING AN INSTANCE
WooSignal.getInstance(config: wsConfig).then( (wcStore) {

    wcStore.createOrderNote({
      @required int id,
      Map<String, dynamic> data,
      }).then( (orderNote) {
        print(orderNote.toJson());
    });
});

Response

OrderNote instance

Represents the following object - WooCommerce create an order note


Retrieve an order note

This API lets you retrieve and view a specific note from an order.

retrieveOrderNote({})

Parameters

@required int orderId,
@required int noteId

API Call

// CONFIG FOR WOOSIGNAL
var wsConfig = {
"appKey":"your app key",
"debugMode":true
};

// CREATING AN INSTANCE
WooSignal.getInstance(config: wsConfig).then( (wcStore) {

  wcStore.retrieveOrderNote({
      int orderId,
      int noteId,
      }).then( (orderNote) {
      print(orderNote.toJson());
  });
});

Response

OrderNote instance

Represents the following object - WooCommerce retrieve an order note


List all order notes

This API helps you to view all the notes from an order.

getOrderNotes({})

Parameters

@required int orderId,
String context,
String type

API Call

// CONFIG FOR WOOSIGNAL
var wsConfig = {
"appKey":"your app key",
"debugMode":true
};

// CREATING AN INSTANCE
WooSignal.getInstance(config: wsConfig).then( (wcStore) {

  wcStore.getOrderNotes({
      int orderId,
      String context,
      String type,
      }).then( (orderNote) {
      print(orderNote.toJson());
  });
});

Response

List<OrderNote> instance

Represents the following object - WooCommerce list all order notes


Delete an order note

This API helps you delete an order note.

deleteOrderNote({})

Parameters

int orderId,
int noteId

API Call

// CONFIG FOR WOOSIGNAL
var wsConfig = {
"appKey":"your app key",
"debugMode":true
};

// CREATING AN INSTANCE
WooSignal.getInstance(config: wsConfig).then( (wcStore) {

  wcStore.deleteOrderNote(
      int orderId,
      int noteId
      ).then( (orderNote) {
      print(orderNote.toJson());
  });
});

Response

OrderNote instance

Represents the following object - WooCommerce delete an order note