Skip to main content
PUT
/
purchase-orders
/
{id}
curl --request PUT \
  --url https://{companyName}.api.joinluminous.com/external/api/v1/purchase-orders/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "order_status": "completed"
}
'
{
  "data": {
    "id": 123,
    "order_numbers": [
      "<string>"
    ],
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "order_status": "active",
    "order_date": "2023-12-25",
    "invoice_date": "2023-12-25",
    "arrival_due_date": "2023-12-25",
    "requested_ship_date": "2023-12-25",
    "order_type": 123,
    "incoterm": "<string>",
    "tracking_info": "<string>",
    "payment_terms": "<string>",
    "supplier_id": 123,
    "item_count": 123,
    "total_qty_ordered": 123,
    "total_qty_received": 123,
    "total_qty_remaining": 123,
    "order_cost": 123,
    "total_tax": 123,
    "total_shipping_cost": 123,
    "total_cost": 123,
    "total_paid": 123,
    "total_due": 123,
    "down_payment": 123,
    "public_note": "<string>",
    "private_note": "<string>",
    "starred": true,
    "items": [
      {
        "id": 123,
        "purchase_order_id": 123,
        "created_at": "2023-11-07T05:31:56Z",
        "updated_at": "2023-11-07T05:31:56Z",
        "quantity": 123,
        "unit_price": 123,
        "unit": "<string>",
        "tax": 123,
        "discount_amount": 123,
        "line_total": 123,
        "received_quantity": 123,
        "source_sku": "<string>",
        "product": {
          "id": 123,
          "name": "<string>",
          "description": "<string>",
          "retail_price": 123,
          "wholesale_price": 123,
          "variant_attributes": {},
          "sku": "<string>",
          "upc": "<string>",
          "created_at": "2023-11-07T05:31:56Z",
          "updated_at": "2023-11-07T05:31:56Z"
        }
      }
    ],
    "supplier": {
      "id": 123,
      "status": 123,
      "name": "<string>",
      "description": "<string>",
      "street_address": "<string>",
      "city": "<string>",
      "state": "<string>",
      "zip": "<string>",
      "country": "<string>",
      "contact_name": "<string>",
      "contact_email": "<string>",
      "contact_phone": "<string>",
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z"
    },
    "payments": [
      {
        "id": 123,
        "payment_date": "2023-12-25",
        "payment_type": "cash",
        "paid_amount": 123,
        "remarks": "<string>",
        "external_id": "<string>",
        "created_by": {
          "id": 123,
          "name": "<string>"
        },
        "created_at": "2023-11-07T05:31:56Z",
        "updated_at": "2023-11-07T05:31:56Z"
      }
    ],
    "ship_to": {
      "address_1": "<string>",
      "address_2": "<string>",
      "city": "<string>",
      "state": "<string>",
      "zip": "<string>",
      "country": "<string>",
      "default_ship_to_address": "ship_to_address"
    },
    "warehouse": {
      "id": 123,
      "name": "<string>"
    },
    "location": {
      "id": 123,
      "name": "<string>"
    },
    "tags": [
      {
        "id": 123,
        "name": "<string>",
        "description": "<string>",
        "icon": "<string>",
        "color": "<string>"
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

Authenticate using a bearer token. To obtain a token, contact [email protected]

Path Parameters

id
integer
required

ID of the purchase order to update

Body

application/json
order_date
string<date>
required

Date when the purchase order was created (YYYY-MM-DD)

Example:

"2024-01-15"

supplier_id
integer
required

ID of the supplier

Example:

123

items
object[]
required

Array of line items for the purchase order

Minimum array length: 1
warehouse_id
integer | null

ID of the warehouse

Example:

1

location_id
integer | null

ID of the location

Example:

1

order_status
enum<string> | null
default:active

Status of the purchase order

Available options:
active,
completed,
deleted
Example:

"active"

order_numbers
string[] | null

Array of purchase order numbers used to identify the purchase order across various systems

Maximum string length: 255
Example:
["PO-2024-001", "SUPPLIER-PO-123"]
invoice_date
string<date> | null

Date when the purchase order was invoiced (YYYY-MM-DD)

Example:

"2024-01-16"

total_shipping_cost
number<float> | null
default:0

Total shipping cost

Required range: x >= 0
Example:

50

total_tax
number<float> | null
default:0

Total tax amount

Required range: x >= 0
Example:

80

public_note
string | null

Public notes visible to suppliers

Example:

"Please ship via express delivery"

private_note
string | null

Internal private notes

Example:

"Rush order - expedite processing"

requested_ship_date
string<date> | null

Requested shipping date (YYYY-MM-DD)

Example:

"2024-01-20"

arrival_due_date
string<date> | null

Expected arrival date (YYYY-MM-DD)

Example:

"2024-01-25"

ship_to
object

Shipping address information

payments
object[] | null

Array of payments for this purchase order. If provided, replaces all existing payments. Totals are automatically recalculated after payments are updated.

custom_fields
object

Custom field values for the purchase order

Example:
{
"Customer PO": "PO-98765",
"Priority Level": "High"
}
tags
string[] | null

Tags to associate with the purchase order

Maximum string length: 255
Example:
["urgent", "priority", "rush-order"]

Response

Purchase order updated successfully

data
object