Add a catalog item
POST
/catalog-items
const url = 'https://theoria.hypertheory-labs.com/clerk-records/purchasing/catalog-items';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"vendorId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","category":"example","description":"example","unit":"example","unitPrice":1,"contractNumber":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://theoria.hypertheory-labs.com/clerk-records/purchasing/catalog-items \ --header 'Content-Type: application/json' \ --data '{ "vendorId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "category": "example", "description": "example", "unit": "example", "unitPrice": 1, "contractNumber": "example" }'Adds an item against a vendor. The vendor must be in approved standing at the time the item is added. Items are not removed when a vendor’s standing later changes; they remain in the catalog and the standing check is the control.
Request Body required
Section titled “Request Body required ” Media type application/json
object
vendorId
required
string format: uuid
category
required
string
description
required
string
unit
required
string
unitPrice
required
number
contractNumber
string | null
Example generated
{ "vendorId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "category": "example", "description": "example", "unit": "example", "unitPrice": 1, "contractNumber": "example"}Responses
Section titled “ Responses ”Item added.
Media type application/json
object
id
required
string format: uuid
vendorId
required
string format: uuid
category
required
Purchasing category code.
string
description
required
string
unit
required
Unit of issue, e.g. EA, TON, HR.
string
unitPrice
required
USD. Currency is not carried.
number
contractNumber
string | null
Example generated
{ "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "vendorId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "category": "example", "description": "example", "unit": "example", "unitPrice": 1, "contractNumber": "example"}Headers
Section titled “Headers ” Location
string format: uri-reference
Problem details.
Media type application/problem+json
RFC 9457 problem details.
object
type
string format: uri
title
string
status
integer
detail
string
instance
string
Example generated
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "instance": "example"}The vendor is not in approved standing.
Media type application/problem+json
RFC 9457 problem details.
object
type
string format: uri
title
string
status
integer
detail
string
instance
string
Example generated
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "instance": "example"} Training environment
Theoria, Ohio is a fictional town. Course material for
Hypertheory Training.