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

Create Supplier Bill Line

Developing
POST
/v1/supplier_bills/{supplier_bill_id}/lines/
Creates a line for attached to the given supplier bill.

Request

Authorization
Add parameter in header
Authorization
Example:
Authorization: ********************
Path Params
supplier_bill_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
part
string 
Part
required
>= 1 characters
description
string 
Description
required
>= 1 characters
quant
string <decimal>
Quant
required
unit_price
string <decimal>
Unit price
required
line_total
string <decimal>
Line total
required
notes
string 
Notes
optional
ext_sku
string 
Ext sku
optional
purchase_lines
array[object (CreateSupplierBillLinePurchaseLineJoin) {3}] 
optional
quant
string <decimal>
Quant
required
notes
string 
Notes
optional
purchase_line
string <uuid>
Purchase line
required
no_part_purchase_lines
array[object (CreateSupplierBillLineNoPartPurchaseLineJoin) {3}] 
optional
quant
string <decimal>
Quant
required
notes
string 
Notes
optional
no_part_purchase_line
string <uuid>
No part purchase line
required
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",
  "part": "string",
  "description": "string",
  "quant": "string",
  "unit_price": "string",
  "line_total": "string",
  "notes": "string",
  "ext_sku": "string",
  "purchase_lines": [
    {
      "quant": "string",
      "notes": "string",
      "purchase_line": "2306bb38-ab1d-40de-bcbc-d74c574db86e"
    }
  ],
  "no_part_purchase_lines": [
    {
      "quant": "string",
      "notes": "string",
      "no_part_purchase_line": "e014336f-2307-4881-b700-c294ae90744c"
    }
  ],
  "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 POST '/v1/supplier_bills//lines/' \
--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",
    "part": "string",
    "description": "string",
    "quant": "string",
    "unit_price": "string",
    "line_total": "string",
    "notes": "string",
    "ext_sku": "string",
    "purchase_lines": [
        {
            "quant": "string",
            "notes": "string",
            "purchase_line": "2306bb38-ab1d-40de-bcbc-d74c574db86e"
        }
    ],
    "no_part_purchase_lines": [
        {
            "quant": "string",
            "notes": "string",
            "no_part_purchase_line": "e014336f-2307-4881-b700-c294ae90744c"
        }
    ],
    "custom_properties": {
        "property1": "string",
        "property2": "string"
    }
}'

Responses

🟢200Success
application/json
Body
id
string <uuid>
Id
read-onlyoptional
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
part
string 
Part
optional
<= 12 characters
description
string 
Description
optional
quant
string <decimal>
Quant
required
unit_price
string <decimal>
Unit price
optional
line_total
string <decimal>
Line total
optional
notes
string 
Notes
optional
ext_sku
string 
Ext sku
optional
<= 255 characters
supplier_bill_id
string 
Supplier bill id
read-onlyoptional
org_id
string 
Org id
read-onlyoptional
purchase_lines
array[object (SupplierBillLinePurchaseLineJoin) {6}] 
read-onlyoptional
id
string <uuid>
Id
read-onlyoptional
quant
string <decimal>
Quant
required
notes
string 
Notes
optional
supplier_bill_line_id
string 
Supplier bill line id
read-onlyoptional
purchase_line_id
string 
Purchase line id
read-onlyoptional
no_part_purchase_line_id
string 
No part purchase line id
read-onlyoptional
no_part_purchase_lines
array[object (SupplierBillLinePurchaseLineJoin) {6}] 
read-onlyoptional
id
string <uuid>
Id
read-onlyoptional
quant
string <decimal>
Quant
required
notes
string 
Notes
optional
supplier_bill_line_id
string 
Supplier bill line id
read-onlyoptional
purchase_line_id
string 
Purchase line id
read-onlyoptional
no_part_purchase_line_id
string 
No part purchase line id
read-onlyoptional
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",
  "part": "string",
  "description": "string",
  "quant": "string",
  "unit_price": "string",
  "line_total": "string",
  "notes": "string",
  "ext_sku": "string",
  "supplier_bill_id": "string",
  "org_id": "string",
  "purchase_lines": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "quant": "string",
      "notes": "string",
      "supplier_bill_line_id": "string",
      "purchase_line_id": "string",
      "no_part_purchase_line_id": "string"
    }
  ],
  "no_part_purchase_lines": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "quant": "string",
      "notes": "string",
      "supplier_bill_line_id": "string",
      "purchase_line_id": "string",
      "no_part_purchase_line_id": "string"
    }
  ]
}
Modified at 2024-12-19 01:54:12
Previous
Create Supplier Bill
Next
Get Teams
Built with