Skip to main content
POST
/
inventory
/
stocks
/
link-supplier
Link Supplier To Stock
curl --request POST \
  --url https://api.decodahealth.com/inventory/stocks/link-supplier \
  --header 'API-KEY: <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'TENANT: <tenant>' \
  --data '
[
  {
    "supplierId": "<string>",
    "stockId": "<string>",
    "uoms": [
      {
        "supplierPartNumber": "<string>",
        "uom": "AMPOULES",
        "conversionFactor": 1,
        "isDefault": false,
        "displayLabel": "<string>",
        "price": 123,
        "leadTime": 1
      }
    ]
  }
]
'
[
  {
    "supplierId": "<string>",
    "stockId": "<string>",
    "id": "<string>",
    "uoms": [
      {
        "supplierPartNumber": "<string>",
        "uom": "AMPOULES",
        "id": "<string>",
        "supplierToStockId": "<string>",
        "conversionFactor": 1,
        "isDefault": false,
        "displayLabel": "<string>",
        "price": 123,
        "leadTime": 1,
        "createdDate": "2023-11-07T05:31:56Z",
        "updatedDate": "2023-11-07T05:31:56Z",
        "isArchived": false
      }
    ],
    "createdDate": "2023-11-07T05:31:56Z",
    "updatedDate": "2023-11-07T05:31:56Z",
    "isArchived": false
  }
]

Headers

TENANT
string
required

The tenant you are making this request on behalf of

API-KEY
string
required

Your api key

Body

application/json

Schema for creating a new supplier-to-stock link with UOM entries.

supplierId
string
required

ID of the supplier

stockId
string
required

ID of the stock

uoms
SupplierToStockUomCreate · object[]
required

UOM entries for this supplier-stock link

Minimum array length: 1

Response

Successful Response

supplierId
string
required

ID of the supplier

stockId
string
required

ID of the stock

id
string
required

Unique identifier for the supplier-to-stock relationship

uoms
SupplierToStockUom · object[] | null

UOM variants for this supplier-stock link

createdDate
string<date-time> | null

Date the link was created

updatedDate
string<date-time> | null

Date the link was last updated

isArchived
boolean
default:false

Whether the link is archived