Skip to main content
POST
/
inventory
/
shipments
/
create
Create Shipments
curl --request POST \
  --url https://api.decodahealth.com/inventory/shipments/create \
  --header 'API-KEY: <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'TENANT: <tenant>' \
  --data '
[
  {
    "stockId": "<string>",
    "supplierId": "<string>",
    "locationId": "<string>",
    "quantity": 123,
    "remainingQuantity": 123,
    "id": "<string>",
    "lotNumber": "<string>",
    "expiryDate": "2023-11-07T05:31:56Z",
    "sku": "<string>",
    "cost": 123,
    "supplier": {
      "name": "<string>",
      "id": "<string>",
      "description": "<string>",
      "website": "<string>",
      "email": "<string>",
      "preferredContactMethod": "<string>",
      "phoneNumber": "<string>",
      "addressLineOne": "<string>",
      "addressLineTwo": "<string>",
      "city": "<string>",
      "state": "<string>",
      "zipCode": "<string>",
      "country": "<string>",
      "isArchived": false
    },
    "createdDate": "2023-11-07T05:31:56Z",
    "note": "<string>"
  }
]
'
[
  {
    "stockId": "<string>",
    "supplierId": "<string>",
    "locationId": "<string>",
    "quantity": 123,
    "remainingQuantity": 123,
    "locationName": "<string>",
    "id": "<string>",
    "lotNumber": "<string>",
    "expiryDate": "2023-11-07T05:31:56Z",
    "sku": "<string>",
    "cost": 123,
    "supplier": {
      "name": "<string>",
      "id": "<string>",
      "description": "<string>",
      "website": "<string>",
      "email": "<string>",
      "preferredContactMethod": "<string>",
      "phoneNumber": "<string>",
      "addressLineOne": "<string>",
      "addressLineTwo": "<string>",
      "city": "<string>",
      "state": "<string>",
      "zipCode": "<string>",
      "country": "<string>",
      "isArchived": false
    },
    "createdDate": "2023-11-07T05:31:56Z",
    "note": "<string>"
  }
]

Headers

TENANT
string
required

The tenant you are making this request on behalf of

API-KEY
string
required

Your api key

Body

application/json
stockId
string
required

ID of the stock

supplierId
string
required

ID of the supplier

locationId
string
required

ID of the location where the shipment was delivered

quantity
number
required

Total quantity

remainingQuantity
number
required

Remaining quantity

id
string

Unique identifier for the shipment

lotNumber
string | null

Optional lot number of the shipment

expiryDate
string<date-time> | null

Optional expiry date of the shipment

sku
string | null

Optional SKU (Stock Keeping Unit)

cost
integer | null

Cost of the shipment in cents

supplier
Supplier · object

Optional supplier details

createdDate
string<date-time> | null

Date and time the shipment was created

note
string | null

Optional note for inventory log when updating shipment

Response

Successful Response

stockId
string
required

ID of the stock

supplierId
string
required

ID of the supplier

locationId
string
required

ID of the location where the shipment was delivered

quantity
number
required

Total quantity

remainingQuantity
number
required

Remaining quantity

locationName
string | null
required

Get the location name from the related location object

id
string

Unique identifier for the shipment

lotNumber
string | null

Optional lot number of the shipment

expiryDate
string<date-time> | null

Optional expiry date of the shipment

sku
string | null

Optional SKU (Stock Keeping Unit)

cost
integer | null

Cost of the shipment in cents

supplier
Supplier · object

Optional supplier details

createdDate
string<date-time> | null

Date and time the shipment was created

note
string | null

Optional note for inventory log when updating shipment