Cofactr Platform API
  1. Stock Lots
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
      GET
    • Creates a Program
      POST
    • Gets a Program
      GET
    • Updates a Program
      PATCH
    • Deletes a Program
      DELETE
    • Gets Program Availabilities
      GET
    • Gets Program Availabilities Async
      GET
    • Gets Program Reference Pricing
      GET
    • Get Programs Lines
      GET
    • Get Programs Line
      GET
    • Update Programs Line
      PATCH
    • Delete Programs Line
      DELETE
    • Create Programs Lines
      POST
    • Get Program Part Overrides
      GET
    • Create Program Part Overrides
      POST
    • Get Program Part Override
      GET
    • Update Program Part Override
      PATCH
    • Delete Program Part Override
      DELETE
  • 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
    • Create Purchase Order
    • Update Purchase Order
    • Delete Purchase Order
    • Get Purchase Lines
    • Get Purchase Line
    • Create Purchase Line
    • Update Many Purchase Lines
    • Delete Purchase Line
    • Get NoPart Purchase Lines
    • Create NoPart Purchase Line
    • Update Many NoPart Purchase Lines
    • Delete NoPart Purchase Line
    • Create Purchase Event
    • Update Supplier Bill
    • Update Supplier Bill Line
    • Create Supplier Bill
    • Create Supplier Bill Line
  • 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
      PATCH
    • Upsert Part Stock
      PUT
  • 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. Stock Lots

Updates a StockLot

PATCH
/v1/stock_lots/{stock_lot_id}/
stock
Updates a stock lot using the given data.

Request

Authorization
Add parameter in header
Authorization
Example:
Authorization: ********************
Path Params
stock_lot_id
string 
required
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
quantity
integer 
Quantity
optional
notes
string 
Notes
optional
country_of_origin
string 
Country of origin
optional
<= 2 characters
date_code
string 
Date code
optional
<= 255 characters
mfg_lot_code
string 
Mfg lot code
optional
<= 255 characters
audited_at
string <date-time>
Audited at
optional
expires_at
string <date>
Expires at
optional
quarantined
boolean 
Quarantined
optional
smt_no_pnp
boolean 
Smt no pnp
optional
msl
string 
Msl
optional
<= 2 characters
msl_floor_hours
integer 
Msl floor hours
optional
tape_size
integer 
Tape size
optional
unit_price_paid
string <decimal>
Unit price paid
optional
landed_unit_price_paid
string <decimal>
Landed unit price paid
optional
package_type
enum<string> 
Package type
optional
Allowed values:
tubetraybulktape_singletape_multiplereelunknown
team_id
string <uuid>
Team id
optional
custom_properties
object 
Custom properties
optional
Additional properties
string 
optional
Example
{
  "synced_from_integration": true,
  "integration_source_name": "string",
  "integration_record_id": "string",
  "synced_from_integration_at": "2019-08-24T14:15:22Z",
  "metadata": {},
  "quantity": 0,
  "notes": "string",
  "country_of_origin": "st",
  "date_code": "string",
  "mfg_lot_code": "string",
  "audited_at": "2019-08-24T14:15:22Z",
  "expires_at": "2019-08-24",
  "quarantined": true,
  "smt_no_pnp": true,
  "msl": "st",
  "msl_floor_hours": 0,
  "tape_size": 0,
  "unit_price_paid": "string",
  "landed_unit_price_paid": "string",
  "package_type": "tube",
  "team_id": "810007d0-bec5-486c-b5d1-28fcd8a079ba",
  "custom_properties": {
    "property1": "string",
    "property2": "string"
  }
}

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/stock_lots//' \
--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": {},
    "quantity": 0,
    "notes": "string",
    "country_of_origin": "st",
    "date_code": "string",
    "mfg_lot_code": "string",
    "audited_at": "2019-08-24T14:15:22Z",
    "expires_at": "2019-08-24",
    "quarantined": true,
    "smt_no_pnp": true,
    "msl": "st",
    "msl_floor_hours": 0,
    "tape_size": 0,
    "unit_price_paid": "string",
    "landed_unit_price_paid": "string",
    "package_type": "tube",
    "team_id": "810007d0-bec5-486c-b5d1-28fcd8a079ba",
    "custom_properties": {
        "property1": "string",
        "property2": "string"
    }
}'

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
org_id
string <uuid>
Org id
required
part_id
string <uuid>
Part id
required
lot_id
string 
Lot id
required
>= 1 characters<= 5 characters
country_of_origin
string 
Country of origin
read-onlyoptional
quantity
integer 
Quantity
required
date_code
string 
Date code
optional
<= 255 characters
mfg_lot_code
string 
Mfg lot code
required
>= 1 characters
quarantined
boolean 
Quarantined
optional
smt_no_pnp
boolean 
Smt no pnp
optional
expected
boolean 
Expected
read-onlyoptional
msl
string 
Msl
optional
<= 255 characters
msl_floor_hours
integer 
Msl floor hours
optional
>= -2147483648<= 2147483647
tape_size
integer 
Tape size
optional
>= -2147483648<= 2147483647
audited_at
string <date-time>
Audited at
optional
expires_at
string <date>
Expires at
optional
unit_price_paid
string <decimal>
Unit price paid
optional
Used to store unit cost on stock lots that do not have an associated purchase line for future reporting purposes
landed_unit_price_paid
string <decimal>
Landed unit price paid
optional
Used to store landed unit cost on stock lots that do not have an associated purchase line for future reporting purposes
package_type
enum<string> 
Package type
required
Allowed values:
tubetraybulktape_singletape_multiplereelunknown
stock_location
object (CustomerStockLocationLite) 
required
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
address
object (CustomerStockLocationLite) 
required
created_from_id
string <uuid>
Created from id
required
replaced_by_id
string <uuid>
Replaced by id
required
purchase_order_line_id
string <uuid>
Purchase order line id
required
team
object (TeamLite) 
required
id
string <uuid>
Id
read-onlyrequired
name
string 
Name
required
>= 1 characters<= 255 characters
org
string <uuid>
Org
required
team_type
object (TeamType) 
optional
external_metadata
object 
External metadata
required
internal_metadata
object 
Internal metadata
required
archived
string 
Archived
read-onlyrequired
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",
  "part_id": "28c660ae-a12c-4da7-9243-03385b104cf1",
  "lot_id": "strin",
  "country_of_origin": "string",
  "quantity": 0,
  "date_code": "string",
  "mfg_lot_code": "string",
  "quarantined": true,
  "smt_no_pnp": true,
  "expected": true,
  "msl": "string",
  "msl_floor_hours": -2147483648,
  "tape_size": -2147483648,
  "audited_at": "2019-08-24T14:15:22Z",
  "expires_at": "2019-08-24",
  "unit_price_paid": "string",
  "landed_unit_price_paid": "string",
  "package_type": "tube",
  "stock_location": {
    "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": {}
  },
  "address": {
    "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": {}
  },
  "created_from_id": "36467ebc-4c23-4998-89ba-cd9e1789e0c9",
  "replaced_by_id": "a3d84e0a-4d68-4aaf-98ed-4d6a393ea8e5",
  "purchase_order_line_id": "6aaf2dc6-30c7-4505-9586-18c27b19103c",
  "team": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "name": "string",
    "org": "3b4eb1f5-aaca-43c1-9ccf-5bbd44308aba",
    "team_type": {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "name": "string",
      "plural_name": "string",
      "org": "3b4eb1f5-aaca-43c1-9ccf-5bbd44308aba"
    },
    "external_metadata": {},
    "internal_metadata": {},
    "archived": "string"
  },
  "custom_properties": {}
}
Modified at 2024-10-09 06:13:51
Previous
Get Custom Property
Next
Upsert Part Stock
Built with