Cofactr Platform API
  1. Purchases
Cofactr Platform API
  • BOMs
    • Gets Boms that user has read access to
      GET
    • Creates a Bom using Cofactr Data
      POST
    • Creates a Bom using raw bomline data and performs searches to convert into Cofactr Data
      POST
    • Gets a Bom
      GET
    • Upsert BOM Async
      PUT
    • Updates a Bom
      PATCH
    • Deletes a Bom if still unapproved. Archives a bom if approved.
      DELETE
    • Approves an unapproved Bom.
      POST
    • Gets Bom Lines on a Bom.
      GET
    • Creates a new bomline on a Bom using Cofactr data. If a bomline with the provided part exists it will sum the quants instead of duplicating lines.
      POST
    • Gets a BomLine
      GET
    • Updates a BomLine
      PATCH
    • Removes a Bomline from a Bom.
      DELETE
    • Attempts to create a new Bomline using raw data and performs searches to convert into Cofactr Data. If a Bomline with the same part and refdes exists it will sum the quants instead of duplicating lines.
      POST
  • Programs
    • Gets Programs
    • Creates a Program
    • Gets a Program
    • Updates a Program
    • Deletes a Program
    • Gets Program Availabilities
    • Gets Program Availabilities Async
    • Gets Program Reference Pricing
    • Get Programs Lines
    • Get Programs Line
    • Update Programs Line
    • Delete Programs Line
    • Create Programs Lines
    • Get Program Part Overrides
    • Create Program Part Overrides
    • Get Program Part Override
    • Update Program Part Override
    • Delete Program Part Override
  • Account
    • Sub Org
      • List Sub Orgs
      • Get Sub Org
      • Update Sub Org
      • Create Sub Org
    • Get Org
    • Get Users
    • Get User
  • Reporting
    • Customer SQL Query
  • Email
    • Mark Outbound Email as Sent
    • Create Outbound Email
    • Get Outbound Email
  • Auth
    • Update API Key
  • Async Jobs
    • Get Async Job Status
  • Stock Documents
    • List StockDocuments
    • Get StockDocument
    • Download StockDocument
    • Create StockDocument
  • Suppliers
    • Create Supplier
    • Update Supplier
    • Get Supplier
    • Get Suppliers
  • Parts
    • Async Create Parts
    • Async Upsert Parts
    • Get Part
  • Purchases
    • Get Purchase Order
      GET
    • Create Purchase Order
      POST
    • Update Purchase Order
      PATCH
    • Delete Purchase Order
      DELETE
    • Get Purchase Lines
      GET
    • Get Purchase Line
      GET
    • Create Purchase Line
      POST
    • Update Many Purchase Lines
      PATCH
    • Delete Purchase Line
      DELETE
    • Get NoPart Purchase Lines
      GET
    • Create NoPart Purchase Line
      POST
    • Update Many NoPart Purchase Lines
      PATCH
    • Delete NoPart Purchase Line
      DELETE
    • Create Purchase Event
      POST
    • Update Supplier Bill
      PATCH
    • Update Supplier Bill Line
      PATCH
    • Create Supplier Bill
      POST
    • Create Supplier Bill Line
      POST
  • Teams
    • Get Teams
    • Create Team
    • Get Team
    • Update Team
    • Delete Team
    • Archive Team
    • Unarchive Team
    • Get Team Types
    • Create Team Type
    • Get Team Type
    • Update Team Type
    • Delete Team Type
  • Custom Properties
    • Get Custom Properties
    • Create Custom Property
    • Update Custom Property
    • Get Custom Property
  • Stock Lots
    • Updates a StockLot
    • Upsert Part Stock
  • Tags
    • Get tags
    • Create tag
    • Get tag
    • Update tag
  • Rfqs
    • Create Rfq
    • Update Rfq
  • RfqLines
    • Create RfqLine
    • Update RfqLine
  • SupplierQuote
    • Create Supplier Quote
    • Update Supplier Quote
  • SupplierQuoteLines
    • Create Supplier Quote Line
    • Update Supplier Quote Line
  1. Purchases

Update Purchase Order

PATCH
/v1/purchase_orders/{purchase_id}/
Updates a Purchase Order

Request

Authorization
Add parameter in header
Authorization
Example:
Authorization: ********************
Path Params
purchase_id
string 
required
Query Params
blended
string 
optional
If given, includes sub org's purchases in the lookup for the target update purchase order.
Header Params
x-org-id
string 
optional
Body Params application/json
synced_from_integration
boolean 
Synced from integration
optional
integration_source_name
string 
Integration source name
optional
integration_record_id
string 
Integration record id
optional
synced_from_integration_at
string <date-time>
Synced from integration at
optional
metadata
object 
Metadata
optional
notes
string 
Notes
optional
>= 1 characters
supplier_id
string <uuid>
Supplier id
optional
ship_to_id
string <uuid>
Ship to id
optional
supplier_order_number
string 
Supplier order number
optional
>= 1 characters
cofactr_po_number
string 
Cofactr po number
optional
>= 1 characters
customer_po_number
string 
Customer po number
optional
>= 1 characters
cofactr_credit_approved_at
string <date-time>
Cofactr credit approved at
optional
supplier_connection_type
enum<string> 
Supplier connection type
optional
Allowed values:
supplier_networkcofactr_paydirect
archived_at
string <date-time>
Archived at
optional
locked_at
string <date-time>
Locked at
optional
approved_at
string <date-time>
Approved at
optional
sent_at
string <date-time>
Sent at
optional
voided_at
string <date-time>
Voided at
optional
fulfilled_at
string <date-time>
Fulfilled at
optional
closed_at
string <date-time>
Closed at
optional
po_footer_notes
string 
Po footer notes
optional
>= 1 characters
locked
boolean 
Locked
optional
archived
boolean 
Archived
optional
approved
boolean 
Approved
optional
cofactr_invoice_number
string 
Cofactr invoice number
optional
>= 1 characters
created_by_id
string <uuid>
Created by id
optional
sent_by_id
string <uuid>
Sent by id
optional
voided_by_id
string <uuid>
Voided by id
optional
closed_by_id
string <uuid>
Closed by id
optional
approved_by_id
string <uuid>
Approved by id
optional
fulfilled_by_id
string <uuid>
Fulfilled by id
optional
Example
{
  "synced_from_integration": true,
  "integration_source_name": "string",
  "integration_record_id": "string",
  "synced_from_integration_at": "2019-08-24T14:15:22Z",
  "metadata": {},
  "notes": "string",
  "supplier_id": "3cb1e20c-c6c9-4e71-ba66-399c468f697c",
  "ship_to_id": "bb721090-fa9a-4e46-8bd9-b2279823a3ba",
  "supplier_order_number": "string",
  "cofactr_po_number": "string",
  "customer_po_number": "string",
  "cofactr_credit_approved_at": "2019-08-24T14:15:22Z",
  "supplier_connection_type": "supplier_network",
  "archived_at": "2019-08-24T14:15:22Z",
  "locked_at": "2019-08-24T14:15:22Z",
  "approved_at": "2019-08-24T14:15:22Z",
  "sent_at": "2019-08-24T14:15:22Z",
  "voided_at": "2019-08-24T14:15:22Z",
  "fulfilled_at": "2019-08-24T14:15:22Z",
  "closed_at": "2019-08-24T14:15:22Z",
  "po_footer_notes": "string",
  "locked": true,
  "archived": true,
  "approved": true,
  "cofactr_invoice_number": "string",
  "created_by_id": "9377d689-01fb-4abf-8450-3368d2c1924f",
  "sent_by_id": "f05cf812-b299-471e-8a26-1c7c840b3f8c",
  "voided_by_id": "9a89b602-5f6d-4637-9b9d-032e516e052c",
  "closed_by_id": "8137abb5-2528-4da8-b8c7-021b571380cc",
  "approved_by_id": "5971fe7f-efe5-483c-aa3f-2206bfdfd41a",
  "fulfilled_by_id": "78782694-d196-4281-bd8f-0314d2963d55"
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request PATCH '/v1/purchase_orders//?blended' \
--header 'x-org-id;' \
--header 'Content-Type: application/json' \
--header 'Authorization;' \
--data-raw '{
    "synced_from_integration": true,
    "integration_source_name": "string",
    "integration_record_id": "string",
    "synced_from_integration_at": "2019-08-24T14:15:22Z",
    "metadata": {},
    "notes": "string",
    "supplier_id": "3cb1e20c-c6c9-4e71-ba66-399c468f697c",
    "ship_to_id": "bb721090-fa9a-4e46-8bd9-b2279823a3ba",
    "supplier_order_number": "string",
    "cofactr_po_number": "string",
    "customer_po_number": "string",
    "cofactr_credit_approved_at": "2019-08-24T14:15:22Z",
    "supplier_connection_type": "supplier_network",
    "archived_at": "2019-08-24T14:15:22Z",
    "locked_at": "2019-08-24T14:15:22Z",
    "approved_at": "2019-08-24T14:15:22Z",
    "sent_at": "2019-08-24T14:15:22Z",
    "voided_at": "2019-08-24T14:15:22Z",
    "fulfilled_at": "2019-08-24T14:15:22Z",
    "closed_at": "2019-08-24T14:15:22Z",
    "po_footer_notes": "string",
    "locked": true,
    "archived": true,
    "approved": true,
    "cofactr_invoice_number": "string",
    "created_by_id": "9377d689-01fb-4abf-8450-3368d2c1924f",
    "sent_by_id": "f05cf812-b299-471e-8a26-1c7c840b3f8c",
    "voided_by_id": "9a89b602-5f6d-4637-9b9d-032e516e052c",
    "closed_by_id": "8137abb5-2528-4da8-b8c7-021b571380cc",
    "approved_by_id": "5971fe7f-efe5-483c-aa3f-2206bfdfd41a",
    "fulfilled_by_id": "78782694-d196-4281-bd8f-0314d2963d55"
}'

Responses

🟢200Success
application/json
Body
id
string <uuid>
Id
read-onlyoptional
metadata
object 
Metadata
required
synced_from_integration
boolean 
Synced from integration
read-onlyoptional
synced_from_integration_at
string <date-time>
Synced from integration at
read-onlyoptional
integration_source_name
string 
Integration source name
read-onlyoptional
>= 1 characters
integration_record_id
string 
Integration record id
read-onlyoptional
>= 1 characters
notes
string 
Notes
required
>= 1 characters
org_id
string <uuid>
Org id
required
supplier
object (Supplier) 
optional
id
string <uuid>
required
metadata
object 
required
synced_from_integration
boolean 
required
synced_from_integration_at
string <date-time>
required
integration_source_name
string 
required
integration_record_id
string 
required
notes
string 
required
org
string <uuid>
required
component_cloud_id
string 
required
connection_type
string 
required
use_pricing_api
boolean 
required
use_order_submission_api
boolean 
required
use_order_status_api
boolean 
required
use_order_po
boolean 
required
use_online_checkout
boolean 
required
use_custom_reeling
boolean 
required
allow_non_part_purchase_lines
boolean 
required
automatically_generate_purchases
boolean 
required
automatically_add_requests_to_open_purchases
boolean 
required
automatically_approve_purchases
boolean 
required
automatically_send_purchases
boolean 
required
po_footer_notes
string 
required
invoice_approval
string 
required
name
string 
required
contact_name
string 
required
alt_names
array[string]
required
website
string 
required
phone
string 
required
order_email
string 
required
quoting_email
string 
required
payment_email
string 
required
custom_reel_price
number 
required
additional_fee_flat
number 
required
additional_fee_percentage
number 
required
minimum_line_size
number 
required
minimum_order_size
number 
required
minimum_order_for_scheduled_release
number 
required
minimum_line_for_scheduled_release
number 
required
shipping_options
object 
required
free_ship
object 
required
us_shipping_methods
object 
required
international_shipping_methods
object 
required
allow_dropship
boolean 
required
certifications
array[string]
required
best_case_lead
integer 
required
scheduled_release_period
integer 
required
convenience_return_window
integer 
required
uncertain_lead
boolean 
required
ships_in_lead
integer 
required
buyable
boolean 
required
custom_properties
object 
required
ship_to
object (StockLocationLite) 
optional
id
string <uuid>
Id
read-onlyoptional
name
string 
Name
required
>= 1 characters<= 255 characters
external_name
string 
External name
optional
<= 255 characters
billable
boolean 
Billable
optional
location_type
enum<string> 
Location type
required
Allowed values:
facilityesd_bin_201506bin_sectionbig_reel_hopperbagworkstationdry_cabinetshelfpalletothernot_specified
address
string 
Address
read-onlyoptional
customer_location
boolean 
Customer location
optional
parent
string <uuid>
Parent
required
facility
string <uuid>
Facility
required
notification_email
string <email>
Notification email
optional
<= 255 characters
org
string <uuid>
Org
required
manufacturer
boolean 
Manufacturer
optional
requires_msl_reset
boolean 
Requires msl reset
optional
requires_lcr_inspection
boolean 
Requires lcr inspection
optional
requires_dimensional_inspection
boolean 
Requires dimensional inspection
optional
accepts_tubes
boolean 
Accepts tubes
optional
requires_reels
boolean 
Requires reels
optional
requires_merges
boolean 
Requires merges
optional
requires_splits
boolean 
Requires splits
optional
consumes_stock
boolean 
Consumes stock
optional
long_term_storage
boolean 
Long term storage
optional
warehouse_shipping_enabled
boolean 
Warehouse shipping enabled
optional
warehouse_handling_enabled
boolean 
Warehouse handling enabled
optional
accepts_smt_no_pnp
boolean 
Accepts smt no pnp
optional
default_package
enum<string> 
Default package
optional
Used for warehouse locations to control the default stock lot package type at receiving when package type is unknown
Allowed values:
tubetraybulktape_singletape_multiplereelunknown
custom_properties
object 
Custom properties
optional
status
string 
Status
read-onlyoptional
supplier_order_number
string 
Supplier order number
required
>= 1 characters
cofactr_po_number
string 
Cofactr po number
required
>= 1 characters
customer_po_number
string 
Customer po number
required
>= 1 characters
cofactr_credit_approved_at
string <date-time>
Cofactr credit approved at
optional
supplier_connection_type
enum<string> 
Supplier connection type
required
Allowed values:
supplier_networkcofactr_paydirect
archived_at
string <date-time>
Archived at
optional
created_at
string <date-time>
Created at
read-onlyoptional
locked_at
string <date-time>
Locked at
optional
approved_at
string <date-time>
Approved at
optional
sent_at
string <date-time>
Sent at
optional
voided_at
string <date-time>
Voided at
optional
fulfilled_at
string <date-time>
Fulfilled at
optional
closed_at
string <date-time>
Closed at
optional
po_footer_notes
string 
Po footer notes
optional
locked
string 
Locked
read-onlyoptional
archived
string 
Archived
read-onlyoptional
approved
string 
Approved
read-onlyoptional
cofactr_invoice_number
string 
Cofactr invoice number
required
>= 1 characters
created_by
object (User) 
optional
id
string <uuid>
required
email
string <email>
required
first_name
string 
required
last_name
string 
required
title
string 
optional
org_id
string <uuid>
required
sent_by
object (User) 
optional
voided_by
object (User) 
optional
closed_by
object (User) 
optional
approved_by
object (User) 
optional
fulfilled_by
object (User) 
optional
subtotal
string 
Subtotal
read-onlyoptional
total
string 
Total
read-onlyoptional
cofactr_charge_total
string 
Cofactr charge total
read-onlyoptional
custom_properties
object 
Custom properties
optional
Example
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "metadata": {},
  "synced_from_integration": true,
  "synced_from_integration_at": "2019-08-24T14:15:22Z",
  "integration_source_name": "string",
  "integration_record_id": "string",
  "notes": "string",
  "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",
  "supplier": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "metadata": {},
    "synced_from_integration": true,
    "synced_from_integration_at": "2019-08-24T14:15:22Z",
    "integration_source_name": "string",
    "integration_record_id": "string",
    "notes": "string",
    "org": "3b4eb1f5-aaca-43c1-9ccf-5bbd44308aba",
    "component_cloud_id": "string",
    "connection_type": "string",
    "use_pricing_api": true,
    "use_order_submission_api": true,
    "use_order_status_api": true,
    "use_order_po": true,
    "use_online_checkout": true,
    "use_custom_reeling": true,
    "allow_non_part_purchase_lines": true,
    "automatically_generate_purchases": true,
    "automatically_add_requests_to_open_purchases": true,
    "automatically_approve_purchases": true,
    "automatically_send_purchases": true,
    "po_footer_notes": "string",
    "invoice_approval": "string",
    "name": "string",
    "contact_name": "string",
    "alt_names": [
      "string"
    ],
    "website": "string",
    "phone": "string",
    "order_email": "string",
    "quoting_email": "string",
    "payment_email": "string",
    "custom_reel_price": 0,
    "additional_fee_flat": 0,
    "additional_fee_percentage": 0,
    "minimum_line_size": 0,
    "minimum_order_size": 0,
    "minimum_order_for_scheduled_release": 0,
    "minimum_line_for_scheduled_release": 0,
    "shipping_options": {},
    "free_ship": {},
    "us_shipping_methods": {},
    "international_shipping_methods": {},
    "allow_dropship": true,
    "certifications": [
      "string"
    ],
    "best_case_lead": 0,
    "scheduled_release_period": 0,
    "convenience_return_window": 0,
    "uncertain_lead": true,
    "ships_in_lead": 0,
    "buyable": true,
    "custom_properties": {}
  },
  "ship_to": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "name": "string",
    "external_name": "string",
    "billable": true,
    "location_type": "facility",
    "address": "string",
    "customer_location": true,
    "parent": "42e2bc1b-6741-4e2e-b138-97b4a342c999",
    "facility": "c7817696-f95c-43d7-adb1-358006544c72",
    "notification_email": "user@example.com",
    "org": "3b4eb1f5-aaca-43c1-9ccf-5bbd44308aba",
    "manufacturer": true,
    "requires_msl_reset": true,
    "requires_lcr_inspection": true,
    "requires_dimensional_inspection": true,
    "accepts_tubes": true,
    "requires_reels": true,
    "requires_merges": true,
    "requires_splits": true,
    "consumes_stock": true,
    "long_term_storage": true,
    "warehouse_shipping_enabled": true,
    "warehouse_handling_enabled": true,
    "accepts_smt_no_pnp": true,
    "default_package": "tube",
    "custom_properties": {}
  },
  "status": "string",
  "supplier_order_number": "string",
  "cofactr_po_number": "string",
  "customer_po_number": "string",
  "cofactr_credit_approved_at": "2019-08-24T14:15:22Z",
  "supplier_connection_type": "supplier_network",
  "archived_at": "2019-08-24T14:15:22Z",
  "created_at": "2019-08-24T14:15:22Z",
  "locked_at": "2019-08-24T14:15:22Z",
  "approved_at": "2019-08-24T14:15:22Z",
  "sent_at": "2019-08-24T14:15:22Z",
  "voided_at": "2019-08-24T14:15:22Z",
  "fulfilled_at": "2019-08-24T14:15:22Z",
  "closed_at": "2019-08-24T14:15:22Z",
  "po_footer_notes": "string",
  "locked": "string",
  "archived": "string",
  "approved": "string",
  "cofactr_invoice_number": "string",
  "created_by": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "email": "user@example.com",
    "first_name": "string",
    "last_name": "string",
    "title": "string",
    "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b"
  },
  "sent_by": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "email": "user@example.com",
    "first_name": "string",
    "last_name": "string",
    "title": "string",
    "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b"
  },
  "voided_by": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "email": "user@example.com",
    "first_name": "string",
    "last_name": "string",
    "title": "string",
    "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b"
  },
  "closed_by": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "email": "user@example.com",
    "first_name": "string",
    "last_name": "string",
    "title": "string",
    "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b"
  },
  "approved_by": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "email": "user@example.com",
    "first_name": "string",
    "last_name": "string",
    "title": "string",
    "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b"
  },
  "fulfilled_by": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "email": "user@example.com",
    "first_name": "string",
    "last_name": "string",
    "title": "string",
    "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b"
  },
  "subtotal": "string",
  "total": "string",
  "cofactr_charge_total": "string",
  "custom_properties": {}
}
Modified at 2024-12-19 01:51:29
Previous
Create Purchase Order
Next
Delete Purchase Order
Built with