Skip to main content
POST
/
purchase_order
/
create
Purchase Order - Create
curl --request POST \
  --url https://api.skulabs.com/purchase_order/create \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "number": "<string>",
  "store_id": "507f1f77bcf86cd799439011",
  "distributor_id": "<string>",
  "warehouse_id": "<string>",
  "items": [
    {
      "item_id": "<string>",
      "kit_id": "<string>",
      "sku": "<string>",
      "name": "<string>",
      "quantity": 123,
      "received": 123,
      "cost": 123,
      "rate": 123,
      "type": "item",
      "serial_numbers": [
        "<string>"
      ],
      "description": "<string>",
      "unit": "<string>"
    }
  ],
  "subtotal": 123,
  "tax": 123,
  "tax_per": 123,
  "total": 123,
  "memo": "<string>",
  "terms": "<string>",
  "shipping": 123,
  "method": "<string>",
  "discount": 123,
  "discount_per": 123,
  "dropship_address": {},
  "status": "closed",
  "due_date": "2025-01-15",
  "dropshipped": true
}
'
{
  "success": true,
  "_id": "507f1f77bcf86cd799439011",
  "number": "<string>",
  "errors": [
    "<string>"
  ],
  "add_results": [
    null
  ],
  "skulabs_warning": {}
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
number
string
required

PO number

store_id
string

Store ID

Example:

"507f1f77bcf86cd799439011"

distributor_id
string

Distributor ID

warehouse_id
string

Warehouse ID

items
object[]

Line items

subtotal
number

Subtotal

tax
number

Tax amount

tax_per
number

Tax percentage

total
number

Total

memo
string

Memo

terms
string

Payment terms

shipping
number

Shipping cost

method
string

Payment method

discount
number

Discount amount

discount_per
number

Discount percentage

dropship_address
object

Dropship address

status
enum<string>

Initial PO status

Available options:
closed,
created,
receiving,
acknowledged,
sent,
edited,
transit,
accepting
due_date
string<date>

Due date

Example:

"2025-01-15"

dropshipped
boolean

Dropshipped flag

Response

Purchase order created

success
boolean
required

Whether the operation succeeded

_id
string

ID of the created purchase order

Example:

"507f1f77bcf86cd799439011"

number

PO number (may be auto-generated)

errors
string[]

Array of validation error messages

add_results
null[]

Results from auto-adding serial numbers (pallet processing)

skulabs_warning
object

Non-fatal warning from background operations