Inventory transactions
Create one or more inventory transactions
One object only. Requires item update permission. Use receiving and production commands for other ledger types.
POST
/
inventory-transaction
Create one or more inventory transactions
curl --request POST \
--url https://{instance}/api/v2/inventory-transaction \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"itemId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"shopId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"unitMeasureId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"unitCost": 123,
"fromLocationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"toLocationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"deliverableId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"deliveryId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"pickLineId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reason": "<string>",
"appUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"metadata": {}
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
itemId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
quantity: 123,
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
shopId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
unitMeasureId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
unitCost: 123,
fromLocationId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
toLocationId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
deliverableId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
deliveryId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
pickLineId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
reason: '<string>',
appUserId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
metadata: {}
})
};
fetch('https://{instance}/api/v2/inventory-transaction', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{instance}/api/v2/inventory-transaction"
payload = {
"itemId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"shopId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"unitMeasureId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"unitCost": 123,
"fromLocationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"toLocationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"deliverableId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"deliveryId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"pickLineId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reason": "<string>",
"appUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"metadata": {}
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"value": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"itemId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"shopId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "receipt",
"quantity": 123,
"unitMeasureId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"unitCost": 123,
"fromLocationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"toLocationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"deliverableId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"deliveryId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"pickLineId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source": "manual",
"reason": "<string>",
"appUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"metadata": {}
}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}Authorizations
Organization-scoped API key. Create one in the BuildingSwell app under Organization settings, API keys.
Body
application/json
Available options:
adjust, transfer, return Optional client-supplied ID.
Available options:
manual, import, scan, count, integration Response
Successful response.
Show child attributes
Show child attributes
⌘I
Create one or more inventory transactions
curl --request POST \
--url https://{instance}/api/v2/inventory-transaction \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"itemId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"shopId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"unitMeasureId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"unitCost": 123,
"fromLocationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"toLocationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"deliverableId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"deliveryId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"pickLineId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reason": "<string>",
"appUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"metadata": {}
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
itemId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
quantity: 123,
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
shopId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
unitMeasureId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
unitCost: 123,
fromLocationId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
toLocationId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
deliverableId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
deliveryId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
pickLineId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
reason: '<string>',
appUserId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
metadata: {}
})
};
fetch('https://{instance}/api/v2/inventory-transaction', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{instance}/api/v2/inventory-transaction"
payload = {
"itemId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"shopId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"unitMeasureId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"unitCost": 123,
"fromLocationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"toLocationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"deliverableId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"deliveryId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"pickLineId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reason": "<string>",
"appUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"metadata": {}
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"value": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"itemId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"shopId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "receipt",
"quantity": 123,
"unitMeasureId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"unitCost": 123,
"fromLocationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"toLocationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"deliverableId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"deliveryId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"pickLineId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source": "manual",
"reason": "<string>",
"appUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"metadata": {}
}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}