- BOMs
- Gets Boms that user has read access toGET
- Creates a Bom using Cofactr DataPOST
- Creates a Bom using raw bomline data and performs searches to convert into Cofactr DataPOST
- Gets a BomGET
- Upsert BOM AsyncPUT
- Updates a BomPATCH
- 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 BomLineGET
- Updates a BomLinePATCH
- 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
- Reporting
- Email
- Auth
- Async Jobs
- Stock Documents
- Suppliers
- Parts
- Purchases
- Get Purchase OrderGET
- Create Purchase OrderPOST
- Update Purchase OrderPATCH
- Delete Purchase OrderDELETE
- Get Purchase LinesGET
- Get Purchase LineGET
- Create Purchase LinePOST
- Update Many Purchase LinesPATCH
- Delete Purchase LineDELETE
- Get NoPart Purchase LinesGET
- Create NoPart Purchase LinePOST
- Update Many NoPart Purchase LinesPATCH
- Delete NoPart Purchase LineDELETE
- Create Purchase EventPOST
- Update Supplier BillPATCH
- Update Supplier Bill LinePATCH
- Create Supplier BillPOST
- Create Supplier Bill LinePOST
- Teams
- Custom Properties
- Stock Lots
- Tags
- Rfqs
- RfqLines
- SupplierQuote
- SupplierQuoteLines
Create Purchase Event
Testing
POST
/v1/purchase_events/
Request
Authorization
Add parameter in header
Authorization
Example:
Authorization: ********************
Header Params
x-org-id
string
optional
Body Params application/json
synced_from_integration
boolean
Synced from integration
integration_source_name
string
Integration source name
integration_record_id
string
Integration record id
synced_from_integration_at
string <date-time>
Synced from integration at
purchase_lines
array[string <uuid>]
required
quantity
integer
Quantity
notes
string
Notes
tracking_number
string
Tracking number
line_total_paid
string <decimal>
Line total paid
sales_tax_paid
string <decimal>
Sales tax paid
shipping_paid
string <decimal>
Shipping paid
other_total_paid
string <decimal>
Other total paid
duties_paid
string <decimal>
Duties paid
estimated_delivery
string <date>
Estimated delivery
expected_ship_by
string <date>
Expected ship by
snoozed_until
string <date>
Snoozed until
coo
string
Coo
date_code
string
Date code
mfg_lot
string
Mfg lot
cofactr_invoice_number
string
Cofactr invoice number
cofactr_invoice_amount
string <decimal>
Cofactr invoice amount
event_type
enum<string>
Event type
Allowed values:
shippedvoidedcanceledadjustedimporteddelayednotereturn_requestreturnconfirmtrackdividecombineinvoiceddelivereddelivery_attemptreschedule_requestreschedulereceivedignoredsnoozed
divide_quant
integer
Divide quant
send_alerts
boolean
Send alerts
Default:
true
Example
{
"synced_from_integration": true,
"integration_source_name": "string",
"integration_record_id": "string",
"synced_from_integration_at": "2019-08-24T14:15:22Z",
"purchase_lines": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"quantity": 0,
"notes": "string",
"tracking_number": "string",
"line_total_paid": "string",
"sales_tax_paid": "string",
"shipping_paid": "string",
"other_total_paid": "string",
"duties_paid": "string",
"estimated_delivery": "2019-08-24",
"expected_ship_by": "2019-08-24",
"snoozed_until": "2019-08-24",
"coo": "string",
"date_code": "string",
"mfg_lot": "string",
"cofactr_invoice_number": "string",
"cofactr_invoice_amount": "string",
"event_type": "shipped",
"divide_quant": 0,
"send_alerts": true
}
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 POST '/v1/purchase_events/' \
--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",
"purchase_lines": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"quantity": 0,
"notes": "string",
"tracking_number": "string",
"line_total_paid": "string",
"sales_tax_paid": "string",
"shipping_paid": "string",
"other_total_paid": "string",
"duties_paid": "string",
"estimated_delivery": "2019-08-24",
"expected_ship_by": "2019-08-24",
"snoozed_until": "2019-08-24",
"coo": "string",
"date_code": "string",
"mfg_lot": "string",
"cofactr_invoice_number": "string",
"cofactr_invoice_amount": "string",
"event_type": "shipped",
"divide_quant": 0,
"send_alerts": true
}'
Responses
🟢200Success
application/json
Body
id
string <uuid>
Id
synced_from_integration
boolean
Synced from integration
synced_from_integration_at
string <date-time>
Synced from integration at
integration_source_name
string
Integration source name
>= 1 characters
integration_record_id
string
Integration record id
>= 1 characters
quantity
integer
Quantity
cofactr_invoice_number
string
Cofactr invoice number
>= 1 characters
cofactr_invoice_amount
string <decimal>
Cofactr invoice amount
created_at
string <date-time>
Created at
updated_at
string <date-time>
Updated at
deleted_at
string <date-time>
Deleted at
internal_metadata
object
Internal metadata
external_metadata
object
External metadata
ext_data_source_id
string
Ext data source id
<= 255 characters
data_source
string
Data source
<= 255 characters
data_source_synced_at
string <date-time>
Data source synced at
externally_synced
boolean
Externally synced
quant
integer
Quant
>= -2147483648<= 2147483647
notes
string
Notes
timestamp
string <date-time>
Timestamp
tracking_number
string
Tracking number
<= 255 characters
carrier
string
Carrier
<= 255 characters
invoice_number
string
Invoice number
<= 255 characters
invoice_amount
string <decimal>
Invoice amount
line_total_paid
string <decimal>
Line total paid
sales_tax_paid
string <decimal>
Sales tax paid
shipping_paid
string <decimal>
Shipping paid
other_total_paid
string <decimal>
Other total paid
duties_paid
string <decimal>
Duties paid
estimated_delivery
string <date>
Estimated delivery
snoozed_until
string <date>
Snoozed until
event_type
enum<string>
Event type
Allowed values:
shippedvoidedcanceledadjustedimporteddelayednotereturn_requestreturnconfirmtrackdividecombineinvoiceddelivereddelivery_attemptreschedule_requestreschedulereceivedignoredsnoozed
tracking_status
string
Tracking status
<= 32 characters
purchase
string <uuid>
Purchase
org
string <uuid>
Org
created_by
string <uuid>
Created by
purchase_lines
array[string <uuid>]
optional
Example
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"synced_from_integration": true,
"synced_from_integration_at": "2019-08-24T14:15:22Z",
"integration_source_name": "string",
"integration_record_id": "string",
"quantity": 0,
"cofactr_invoice_number": "string",
"cofactr_invoice_amount": "string",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"deleted_at": "2019-08-24T14:15:22Z",
"internal_metadata": {},
"external_metadata": {},
"ext_data_source_id": "string",
"data_source": "string",
"data_source_synced_at": "2019-08-24T14:15:22Z",
"externally_synced": true,
"quant": -2147483648,
"notes": "string",
"timestamp": "2019-08-24T14:15:22Z",
"tracking_number": "string",
"carrier": "string",
"invoice_number": "string",
"invoice_amount": "string",
"line_total_paid": "string",
"sales_tax_paid": "string",
"shipping_paid": "string",
"other_total_paid": "string",
"duties_paid": "string",
"estimated_delivery": "2019-08-24",
"snoozed_until": "2019-08-24",
"event_type": "shipped",
"tracking_status": "string",
"purchase": "ca27f506-c3a4-4924-9878-316d53640467",
"org": "3b4eb1f5-aaca-43c1-9ccf-5bbd44308aba",
"created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",
"purchase_lines": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
]
}
Modified at 2024-09-26 00:10:05