Instructions
Methods
order_instruction.create
order_instruction.create (string $orderUniqueId, string $note, object|null $options)
Create a new order instruction.
Parameters
- 0 string
- Order unique ID
- 1 string
- Note
- 2 object|null
- Additional Options (see “Order Instruction”)
Return Value
An object with the new Order Instruction. The “file_content” property is not returned. Use the order_instruction.list method to retrieve it.
Example Request
{
"jsonrpc" : 2.0,
"id" : 1234,
"method" : "call",
"params" : [
"be1c13ed4e03f0ed7f1e4053dfff9658",
"order_instruction.create",
[
"100000309",
"Place Amazon FBA Label in a pouch"
{
"file_name" : "amazon_fba_3425232.pdf",
"file_content" : "base64 encoded file content",
"presentation" : "once_per_shipment",
"print_target" : "LASER"
},
]
]
}
Example Response
{
"jsonrpc" : 2.0,
"id" : 1234,
"error" : null,
"result" : {
"instruction_id" : 1,
"order_id" : 118,
"unique_id" : "100000309",
"note" : "Place Amazon FBA Label in a pouch",
"file_name" : "amazon_fba_3425232.pdf",
"presentation" : "once_per_shipment",
"print_target" : "LASER"
}
}
Error Codes
code | message |
---|---|
100 | Invalid data given. Details in error message. |
102 | Requested order does not exist. |
order_instruction.edit
order_instruction.edit (string $instructionId, string|null $note, object|null $options)
Modify the order instruction.
Parameters
- 0 string|int
- Instruction ID
- 1 string|null
- Note
- 2 object|null
- Additional Options (see “Order Instruction”)
Return Value
An object with the updated Order Instruction. The “file_content” property is not returned.
Example Request
{
"jsonrpc" : 2.0,
"id" : 1234,
"method" : "call",
"params" : [
"be1c13ed4e03f0ed7f1e4053dfff9658",
"order_instruction.edit",
[
123,
null,
{
"presentation" : "once_per_order"
}
]
]
}
Example Response
{
"jsonrpc" : 2.0,
"id" : 1234,
"error" : null,
"result" : {
"instruction_id" : 1,
"order_id" : 118,
"unique_id" : "100000309",
"note" : "Place Amazon FBA Label in a pouch",
"file_name" : "amazon_fba_3425232.pdf",
"presentation" : "once_per_order",
"print_target" : "LASER"
}
}
Error Codes
code | message |
---|---|
100 | Invalid data given. Details in error message. |
101 | Requested order instruction does not exist. |
order_instruction.list
order_instruction.list (string $orderUniqueId, array|null $fields = [])
Create a new order instruction.
Parameters
- 0 string
- Order unique ID
- 1 array|null
- Fields
Return Value
An array of objects. Each object will contain Order Instruction properties. Include “file_content” to the list of the fields to return the “file_content” property.
Example Request
{
"jsonrpc" : 2.0,
"id" : 1234,
"method" : "call",
"params" : [
"be1c13ed4e03f0ed7f1e4053dfff9658",
"order_instruction.list",
[
"100000309"
]
]
}
Example Response
{
"jsonrpc" : 2.0,
"id" : 1234,
"error" : null,
"result" : [
{
"instruction_id" : 1,
"order_id" : 118,
"unique_id" : "100000309",
"note" : "Place Amazon FBA Label in a pouch",
"file_name" : "amazon_fba_3425232.pdf",
"presentation" : "once_per_shipment",
"print_target" : "LASER"
},
...
]
}
Error Codes
code | message |
---|---|
100 | Invalid data given. Details in error message. |
102 | Requested order does not exist. |
order_instruction.delete
order_instruction.delete (string $instructionId)
Delete order instruction.
Parameters
- 0 string|int
- Instruction ID
Return Value
true if the order instruction was deleted.
Example Request
{
"jsonrpc" : 2.0,
"id" : 1234,
"method" : "call",
"params" : [
"be1c13ed4e03f0ed7f1e4053dfff9658",
"order_instruction.delete",
[
123
]
]
}
Example Response
{
"jsonrpc" : 2.0,
"id" : 1234,
"error" : null,
"result" : true
}
Entity Properties
Entity Properties
Order Instruction Properties
note |
Instruction to the packer. The note is required.
|
---|---|
file_name |
The "file_name" property.
|
file_content |
The "file_content" property. Must be base64 encoded.
|
presentation |
The "presentation" property. Allowed values: "once_per_order", "once_per_shipment", "once_per_package".
|
print_target |
The "print_target" property. Allowed values: "LABEL", "SMALL_LABEL", "LASER".
|