purchase_order

Purchase Order - Create

Changed on

August 2023: Now supports item_id, kit_id, sku (SKULabs Kit or Item), mpn (Supplier MPN), or barcode (SKULabs Kit or Item barcode) as lookup fields in the item array.

post/purchase_order/create

Request

  • Base URL
    https://api.skulabs.com
  • URL
    https://api.skulabs.com/purchase_order/create
  • Auth
    HTTP bearer

Request body

numberstring required

PO number

store_idstring

Store ID

distributor_idstring

Distributor ID

warehouse_idstring

Warehouse ID

subtotalnumber

Subtotal

taxnumber

Tax amount

tax_pernumber

Tax percentage

totalnumber

Total

memostring

Memo

termsstring

Payment terms

shippingnumber

Shipping cost

methodstring

Payment method

discountnumber

Discount amount

discount_pernumber

Discount percentage

dropship_addressobject

Dropship address

status'closed' | 'created' | 'receiving' | 'acknowledged' | 'sent' | 'edited' | 'transit' | 'accepting'

Initial PO status

due_datestring date

Due date

dropshippedboolean

Dropshipped flag

Example request

{
  "store_id": "507f1f77bcf86cd799439011",
  "due_date": "2025-01-15"
}

Response

Purchase order created

successboolean required

Whether the operation succeeded

_idstring

ID of the created purchase order

errorsstring[]

Array of validation error messages

skulabs_warningobject

Non-fatal warning from background operations

Example response

{
  "_id": "507f1f77bcf86cd799439011"
}

Changes

    • breaking

      request property was restricted to a list of enum values

    • breaking

      the request property became required

    • breaking

      the request property type changed from string to object

    • breaking

      the request property type changed from string to boolean

    • breaking

      the request property type changed from number to string, and format from integer to no format

    • breaking

      the request property type changed from string to number

    • info

      api operation id post_purchase_order_create was added

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      added the new accepting enum value to the request property

    • info

      added the new acknowledged enum value to the request property

    • info

      added the new closed enum value to the request property

    • info

      added the new created enum value to the request property

    • info

      added the new edited enum value to the request property

    • info

      added the new receiving enum value to the request property

    • info

      added the new sent enum value to the request property

    • info

      added the new transit enum value to the request property

    • info

      added the media type application/json for the response with the status

    • info

      added the media type application/json for the response with the status

    • info

      added the media type application/json for the response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • breaking

      added required request body

    • warning

      deleted the query request parameter discount

    • warning

      deleted the query request parameter discount_per

    • warning

      deleted the query request parameter distributor_id

    • warning

      deleted the query request parameter dropship_address

    • warning

      deleted the query request parameter dropshipped

    • warning

      deleted the query request parameter due_date

    • warning

      deleted the query request parameter items

    • warning

      deleted the query request parameter memo

    • warning

      deleted the query request parameter method

    • warning

      deleted the query request parameter number

    • warning

      deleted the query request parameter shipping

    • warning

      deleted the query request parameter status

    • warning

      deleted the query request parameter store_id

    • warning

      deleted the query request parameter subtotal

    • warning

      deleted the query request parameter tax

    • warning

      deleted the query request parameter tax_per

    • warning

      deleted the query request parameter terms

    • warning

      deleted the query request parameter total

    • warning

      deleted the query request parameter warehouse_id

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status