Create InventoryReceipt record
curl --request POST \
--url https://api.dualentry.com/public/v2/inventory-receipts/ \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"date": "2023-12-25",
"company_id": 123,
"exchange_rate": 123,
"items": [
{
"item_id": 123,
"quantity": 123,
"rate": 123,
"uom_id": 123,
"measurement": {
"count": 1,
"length": 1,
"width": 1,
"height": 1,
"dimension_uom_id": 123,
"consumed_count": 1,
"consumed_length": 1,
"consumed_width": 1,
"consumed_height": 1,
"excess_reason": ""
},
"id": 123,
"position": 1,
"memo": "",
"serial_numbers": [],
"serial_import_job_id": 123,
"exchange_rate": 1,
"purchase_order_line_id": 123,
"location_id": 123,
"dimension_count": 123,
"dimension_length": 123,
"dimension_width": 123,
"dimension_height": 123,
"dimension_uom_id": 123,
"consumed_count": 123,
"consumed_length": 123,
"consumed_width": 123,
"consumed_height": 123,
"excess_reason": "<string>",
"custom_fields": [
{}
],
"ownership_recognition_line_id": 123,
"without_recognition": false,
"allocations": [
"<unknown>"
]
}
],
"custom_fields": [
{}
],
"transaction_date": "2023-12-25",
"origin": "manual",
"memo": "",
"attachments": [],
"record_status": "posted",
"location_id": 123,
"vendor_id": 123,
"purchase_order_id": 123,
"exchange_rate_reason": "<string>",
"requires_named_recognition_line": false
}
'import requests
url = "https://api.dualentry.com/public/v2/inventory-receipts/"
payload = {
"date": "2023-12-25",
"company_id": 123,
"exchange_rate": 123,
"items": [
{
"item_id": 123,
"quantity": 123,
"rate": 123,
"uom_id": 123,
"measurement": {
"count": 1,
"length": 1,
"width": 1,
"height": 1,
"dimension_uom_id": 123,
"consumed_count": 1,
"consumed_length": 1,
"consumed_width": 1,
"consumed_height": 1,
"excess_reason": ""
},
"id": 123,
"position": 1,
"memo": "",
"serial_numbers": [],
"serial_import_job_id": 123,
"exchange_rate": 1,
"purchase_order_line_id": 123,
"location_id": 123,
"dimension_count": 123,
"dimension_length": 123,
"dimension_width": 123,
"dimension_height": 123,
"dimension_uom_id": 123,
"consumed_count": 123,
"consumed_length": 123,
"consumed_width": 123,
"consumed_height": 123,
"excess_reason": "<string>",
"custom_fields": [{}],
"ownership_recognition_line_id": 123,
"without_recognition": False,
"allocations": ["<unknown>"]
}
],
"custom_fields": [{}],
"transaction_date": "2023-12-25",
"origin": "manual",
"memo": "",
"attachments": [],
"record_status": "posted",
"location_id": 123,
"vendor_id": 123,
"purchase_order_id": 123,
"exchange_rate_reason": "<string>",
"requires_named_recognition_line": False
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
date: '2023-12-25',
company_id: 123,
exchange_rate: 123,
items: [
{
item_id: 123,
quantity: 123,
rate: 123,
uom_id: 123,
measurement: {
count: 1,
length: 1,
width: 1,
height: 1,
dimension_uom_id: 123,
consumed_count: 1,
consumed_length: 1,
consumed_width: 1,
consumed_height: 1,
excess_reason: ''
},
id: 123,
position: 1,
memo: '',
serial_numbers: [],
serial_import_job_id: 123,
exchange_rate: 1,
purchase_order_line_id: 123,
location_id: 123,
dimension_count: 123,
dimension_length: 123,
dimension_width: 123,
dimension_height: 123,
dimension_uom_id: 123,
consumed_count: 123,
consumed_length: 123,
consumed_width: 123,
consumed_height: 123,
excess_reason: '<string>',
custom_fields: [{}],
ownership_recognition_line_id: 123,
without_recognition: false,
allocations: ['<unknown>']
}
],
custom_fields: [{}],
transaction_date: '2023-12-25',
origin: 'manual',
memo: '',
attachments: [],
record_status: 'posted',
location_id: 123,
vendor_id: 123,
purchase_order_id: 123,
exchange_rate_reason: '<string>',
requires_named_recognition_line: false
})
};
fetch('https://api.dualentry.com/public/v2/inventory-receipts/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.dualentry.com/public/v2/inventory-receipts/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'date' => '2023-12-25',
'company_id' => 123,
'exchange_rate' => 123,
'items' => [
[
'item_id' => 123,
'quantity' => 123,
'rate' => 123,
'uom_id' => 123,
'measurement' => [
'count' => 1,
'length' => 1,
'width' => 1,
'height' => 1,
'dimension_uom_id' => 123,
'consumed_count' => 1,
'consumed_length' => 1,
'consumed_width' => 1,
'consumed_height' => 1,
'excess_reason' => ''
],
'id' => 123,
'position' => 1,
'memo' => '',
'serial_numbers' => [
],
'serial_import_job_id' => 123,
'exchange_rate' => 1,
'purchase_order_line_id' => 123,
'location_id' => 123,
'dimension_count' => 123,
'dimension_length' => 123,
'dimension_width' => 123,
'dimension_height' => 123,
'dimension_uom_id' => 123,
'consumed_count' => 123,
'consumed_length' => 123,
'consumed_width' => 123,
'consumed_height' => 123,
'excess_reason' => '<string>',
'custom_fields' => [
[
]
],
'ownership_recognition_line_id' => 123,
'without_recognition' => false,
'allocations' => [
'<unknown>'
]
]
],
'custom_fields' => [
[
]
],
'transaction_date' => '2023-12-25',
'origin' => 'manual',
'memo' => '',
'attachments' => [
],
'record_status' => 'posted',
'location_id' => 123,
'vendor_id' => 123,
'purchase_order_id' => 123,
'exchange_rate_reason' => '<string>',
'requires_named_recognition_line' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.dualentry.com/public/v2/inventory-receipts/"
payload := strings.NewReader("{\n \"date\": \"2023-12-25\",\n \"company_id\": 123,\n \"exchange_rate\": 123,\n \"items\": [\n {\n \"item_id\": 123,\n \"quantity\": 123,\n \"rate\": 123,\n \"uom_id\": 123,\n \"measurement\": {\n \"count\": 1,\n \"length\": 1,\n \"width\": 1,\n \"height\": 1,\n \"dimension_uom_id\": 123,\n \"consumed_count\": 1,\n \"consumed_length\": 1,\n \"consumed_width\": 1,\n \"consumed_height\": 1,\n \"excess_reason\": \"\"\n },\n \"id\": 123,\n \"position\": 1,\n \"memo\": \"\",\n \"serial_numbers\": [],\n \"serial_import_job_id\": 123,\n \"exchange_rate\": 1,\n \"purchase_order_line_id\": 123,\n \"location_id\": 123,\n \"dimension_count\": 123,\n \"dimension_length\": 123,\n \"dimension_width\": 123,\n \"dimension_height\": 123,\n \"dimension_uom_id\": 123,\n \"consumed_count\": 123,\n \"consumed_length\": 123,\n \"consumed_width\": 123,\n \"consumed_height\": 123,\n \"excess_reason\": \"<string>\",\n \"custom_fields\": [\n {}\n ],\n \"ownership_recognition_line_id\": 123,\n \"without_recognition\": false,\n \"allocations\": [\n \"<unknown>\"\n ]\n }\n ],\n \"custom_fields\": [\n {}\n ],\n \"transaction_date\": \"2023-12-25\",\n \"origin\": \"manual\",\n \"memo\": \"\",\n \"attachments\": [],\n \"record_status\": \"posted\",\n \"location_id\": 123,\n \"vendor_id\": 123,\n \"purchase_order_id\": 123,\n \"exchange_rate_reason\": \"<string>\",\n \"requires_named_recognition_line\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.dualentry.com/public/v2/inventory-receipts/")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"date\": \"2023-12-25\",\n \"company_id\": 123,\n \"exchange_rate\": 123,\n \"items\": [\n {\n \"item_id\": 123,\n \"quantity\": 123,\n \"rate\": 123,\n \"uom_id\": 123,\n \"measurement\": {\n \"count\": 1,\n \"length\": 1,\n \"width\": 1,\n \"height\": 1,\n \"dimension_uom_id\": 123,\n \"consumed_count\": 1,\n \"consumed_length\": 1,\n \"consumed_width\": 1,\n \"consumed_height\": 1,\n \"excess_reason\": \"\"\n },\n \"id\": 123,\n \"position\": 1,\n \"memo\": \"\",\n \"serial_numbers\": [],\n \"serial_import_job_id\": 123,\n \"exchange_rate\": 1,\n \"purchase_order_line_id\": 123,\n \"location_id\": 123,\n \"dimension_count\": 123,\n \"dimension_length\": 123,\n \"dimension_width\": 123,\n \"dimension_height\": 123,\n \"dimension_uom_id\": 123,\n \"consumed_count\": 123,\n \"consumed_length\": 123,\n \"consumed_width\": 123,\n \"consumed_height\": 123,\n \"excess_reason\": \"<string>\",\n \"custom_fields\": [\n {}\n ],\n \"ownership_recognition_line_id\": 123,\n \"without_recognition\": false,\n \"allocations\": [\n \"<unknown>\"\n ]\n }\n ],\n \"custom_fields\": [\n {}\n ],\n \"transaction_date\": \"2023-12-25\",\n \"origin\": \"manual\",\n \"memo\": \"\",\n \"attachments\": [],\n \"record_status\": \"posted\",\n \"location_id\": 123,\n \"vendor_id\": 123,\n \"purchase_order_id\": 123,\n \"exchange_rate_reason\": \"<string>\",\n \"requires_named_recognition_line\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dualentry.com/public/v2/inventory-receipts/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"date\": \"2023-12-25\",\n \"company_id\": 123,\n \"exchange_rate\": 123,\n \"items\": [\n {\n \"item_id\": 123,\n \"quantity\": 123,\n \"rate\": 123,\n \"uom_id\": 123,\n \"measurement\": {\n \"count\": 1,\n \"length\": 1,\n \"width\": 1,\n \"height\": 1,\n \"dimension_uom_id\": 123,\n \"consumed_count\": 1,\n \"consumed_length\": 1,\n \"consumed_width\": 1,\n \"consumed_height\": 1,\n \"excess_reason\": \"\"\n },\n \"id\": 123,\n \"position\": 1,\n \"memo\": \"\",\n \"serial_numbers\": [],\n \"serial_import_job_id\": 123,\n \"exchange_rate\": 1,\n \"purchase_order_line_id\": 123,\n \"location_id\": 123,\n \"dimension_count\": 123,\n \"dimension_length\": 123,\n \"dimension_width\": 123,\n \"dimension_height\": 123,\n \"dimension_uom_id\": 123,\n \"consumed_count\": 123,\n \"consumed_length\": 123,\n \"consumed_width\": 123,\n \"consumed_height\": 123,\n \"excess_reason\": \"<string>\",\n \"custom_fields\": [\n {}\n ],\n \"ownership_recognition_line_id\": 123,\n \"without_recognition\": false,\n \"allocations\": [\n \"<unknown>\"\n ]\n }\n ],\n \"custom_fields\": [\n {}\n ],\n \"transaction_date\": \"2023-12-25\",\n \"origin\": \"manual\",\n \"memo\": \"\",\n \"attachments\": [],\n \"record_status\": \"posted\",\n \"location_id\": 123,\n \"vendor_id\": 123,\n \"purchase_order_id\": 123,\n \"exchange_rate_reason\": \"<string>\",\n \"requires_named_recognition_line\": false\n}"
response = http.request(request)
puts response.read_body{
"internal_id": 123,
"number": 123,
"transaction_id": 123,
"company_id": 123,
"company_name": "<string>",
"date": "2023-12-25",
"memo": "<string>",
"transaction_date": "2023-12-25",
"currency_iso_4217_code": "AED",
"exchange_rate": "<string>",
"amount": "<string>",
"items": [
{
"id": 123,
"item_id": 123,
"quantity": "<string>",
"rate": "<string>",
"location_name": "<string>",
"amount": "<string>",
"uom_id": 123,
"measurement": {
"count": "<string>",
"length": "<string>",
"width": "<string>",
"height": "<string>",
"dimension_uom_id": 123,
"consumed_count": "<string>",
"consumed_length": "<string>",
"consumed_width": "<string>",
"consumed_height": "<string>",
"excess_reason": "",
"consumed_base_quantity": "<string>",
"excess_quantity": "<string>",
"item_density": "<string>"
},
"position": 1,
"memo": "",
"serial_numbers": [],
"serial_import_job_id": 123,
"exchange_rate": "<string>",
"purchase_order_line_id": 123,
"location_id": 123,
"custom_fields": [],
"item_type": "<string>",
"hsn_sac_code": "<string>",
"uom_code": "<string>",
"base_quantity": "<string>",
"ownership_recognition_line_id": 123,
"allocations": [],
"landed_unit_cost": "<string>"
}
],
"record_status": "draft",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"attachments": [],
"created_by": {
"actor_type": "<string>",
"email": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"via": "<string>",
"agent_id": 123,
"agent_name": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
},
"updated_by": {
"actor_type": "<string>",
"email": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"via": "<string>",
"agent_id": 123,
"agent_name": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
},
"location_id": 123,
"location_name": "<string>",
"vendor_id": 123,
"purchase_order_id": 123,
"exchange_rate_reason": "",
"market_rate": "<string>",
"posting_rate": "<string>"
}{
"errors": {},
"success": false,
"error_code": "<string>",
"error_reason": "<string>"
}{
"errors": {},
"success": false,
"error_code": "<string>",
"error_reason": "<string>"
}{
"errors": {},
"success": false,
"error_code": "<string>",
"error_reason": "<string>"
}Inventory Receipts
Create InventoryReceipt record
Create a new InventoryReceipt record with the provided data.
POST
/
public
/
v2
/
inventory-receipts
/
Create InventoryReceipt record
curl --request POST \
--url https://api.dualentry.com/public/v2/inventory-receipts/ \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"date": "2023-12-25",
"company_id": 123,
"exchange_rate": 123,
"items": [
{
"item_id": 123,
"quantity": 123,
"rate": 123,
"uom_id": 123,
"measurement": {
"count": 1,
"length": 1,
"width": 1,
"height": 1,
"dimension_uom_id": 123,
"consumed_count": 1,
"consumed_length": 1,
"consumed_width": 1,
"consumed_height": 1,
"excess_reason": ""
},
"id": 123,
"position": 1,
"memo": "",
"serial_numbers": [],
"serial_import_job_id": 123,
"exchange_rate": 1,
"purchase_order_line_id": 123,
"location_id": 123,
"dimension_count": 123,
"dimension_length": 123,
"dimension_width": 123,
"dimension_height": 123,
"dimension_uom_id": 123,
"consumed_count": 123,
"consumed_length": 123,
"consumed_width": 123,
"consumed_height": 123,
"excess_reason": "<string>",
"custom_fields": [
{}
],
"ownership_recognition_line_id": 123,
"without_recognition": false,
"allocations": [
"<unknown>"
]
}
],
"custom_fields": [
{}
],
"transaction_date": "2023-12-25",
"origin": "manual",
"memo": "",
"attachments": [],
"record_status": "posted",
"location_id": 123,
"vendor_id": 123,
"purchase_order_id": 123,
"exchange_rate_reason": "<string>",
"requires_named_recognition_line": false
}
'import requests
url = "https://api.dualentry.com/public/v2/inventory-receipts/"
payload = {
"date": "2023-12-25",
"company_id": 123,
"exchange_rate": 123,
"items": [
{
"item_id": 123,
"quantity": 123,
"rate": 123,
"uom_id": 123,
"measurement": {
"count": 1,
"length": 1,
"width": 1,
"height": 1,
"dimension_uom_id": 123,
"consumed_count": 1,
"consumed_length": 1,
"consumed_width": 1,
"consumed_height": 1,
"excess_reason": ""
},
"id": 123,
"position": 1,
"memo": "",
"serial_numbers": [],
"serial_import_job_id": 123,
"exchange_rate": 1,
"purchase_order_line_id": 123,
"location_id": 123,
"dimension_count": 123,
"dimension_length": 123,
"dimension_width": 123,
"dimension_height": 123,
"dimension_uom_id": 123,
"consumed_count": 123,
"consumed_length": 123,
"consumed_width": 123,
"consumed_height": 123,
"excess_reason": "<string>",
"custom_fields": [{}],
"ownership_recognition_line_id": 123,
"without_recognition": False,
"allocations": ["<unknown>"]
}
],
"custom_fields": [{}],
"transaction_date": "2023-12-25",
"origin": "manual",
"memo": "",
"attachments": [],
"record_status": "posted",
"location_id": 123,
"vendor_id": 123,
"purchase_order_id": 123,
"exchange_rate_reason": "<string>",
"requires_named_recognition_line": False
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
date: '2023-12-25',
company_id: 123,
exchange_rate: 123,
items: [
{
item_id: 123,
quantity: 123,
rate: 123,
uom_id: 123,
measurement: {
count: 1,
length: 1,
width: 1,
height: 1,
dimension_uom_id: 123,
consumed_count: 1,
consumed_length: 1,
consumed_width: 1,
consumed_height: 1,
excess_reason: ''
},
id: 123,
position: 1,
memo: '',
serial_numbers: [],
serial_import_job_id: 123,
exchange_rate: 1,
purchase_order_line_id: 123,
location_id: 123,
dimension_count: 123,
dimension_length: 123,
dimension_width: 123,
dimension_height: 123,
dimension_uom_id: 123,
consumed_count: 123,
consumed_length: 123,
consumed_width: 123,
consumed_height: 123,
excess_reason: '<string>',
custom_fields: [{}],
ownership_recognition_line_id: 123,
without_recognition: false,
allocations: ['<unknown>']
}
],
custom_fields: [{}],
transaction_date: '2023-12-25',
origin: 'manual',
memo: '',
attachments: [],
record_status: 'posted',
location_id: 123,
vendor_id: 123,
purchase_order_id: 123,
exchange_rate_reason: '<string>',
requires_named_recognition_line: false
})
};
fetch('https://api.dualentry.com/public/v2/inventory-receipts/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.dualentry.com/public/v2/inventory-receipts/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'date' => '2023-12-25',
'company_id' => 123,
'exchange_rate' => 123,
'items' => [
[
'item_id' => 123,
'quantity' => 123,
'rate' => 123,
'uom_id' => 123,
'measurement' => [
'count' => 1,
'length' => 1,
'width' => 1,
'height' => 1,
'dimension_uom_id' => 123,
'consumed_count' => 1,
'consumed_length' => 1,
'consumed_width' => 1,
'consumed_height' => 1,
'excess_reason' => ''
],
'id' => 123,
'position' => 1,
'memo' => '',
'serial_numbers' => [
],
'serial_import_job_id' => 123,
'exchange_rate' => 1,
'purchase_order_line_id' => 123,
'location_id' => 123,
'dimension_count' => 123,
'dimension_length' => 123,
'dimension_width' => 123,
'dimension_height' => 123,
'dimension_uom_id' => 123,
'consumed_count' => 123,
'consumed_length' => 123,
'consumed_width' => 123,
'consumed_height' => 123,
'excess_reason' => '<string>',
'custom_fields' => [
[
]
],
'ownership_recognition_line_id' => 123,
'without_recognition' => false,
'allocations' => [
'<unknown>'
]
]
],
'custom_fields' => [
[
]
],
'transaction_date' => '2023-12-25',
'origin' => 'manual',
'memo' => '',
'attachments' => [
],
'record_status' => 'posted',
'location_id' => 123,
'vendor_id' => 123,
'purchase_order_id' => 123,
'exchange_rate_reason' => '<string>',
'requires_named_recognition_line' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.dualentry.com/public/v2/inventory-receipts/"
payload := strings.NewReader("{\n \"date\": \"2023-12-25\",\n \"company_id\": 123,\n \"exchange_rate\": 123,\n \"items\": [\n {\n \"item_id\": 123,\n \"quantity\": 123,\n \"rate\": 123,\n \"uom_id\": 123,\n \"measurement\": {\n \"count\": 1,\n \"length\": 1,\n \"width\": 1,\n \"height\": 1,\n \"dimension_uom_id\": 123,\n \"consumed_count\": 1,\n \"consumed_length\": 1,\n \"consumed_width\": 1,\n \"consumed_height\": 1,\n \"excess_reason\": \"\"\n },\n \"id\": 123,\n \"position\": 1,\n \"memo\": \"\",\n \"serial_numbers\": [],\n \"serial_import_job_id\": 123,\n \"exchange_rate\": 1,\n \"purchase_order_line_id\": 123,\n \"location_id\": 123,\n \"dimension_count\": 123,\n \"dimension_length\": 123,\n \"dimension_width\": 123,\n \"dimension_height\": 123,\n \"dimension_uom_id\": 123,\n \"consumed_count\": 123,\n \"consumed_length\": 123,\n \"consumed_width\": 123,\n \"consumed_height\": 123,\n \"excess_reason\": \"<string>\",\n \"custom_fields\": [\n {}\n ],\n \"ownership_recognition_line_id\": 123,\n \"without_recognition\": false,\n \"allocations\": [\n \"<unknown>\"\n ]\n }\n ],\n \"custom_fields\": [\n {}\n ],\n \"transaction_date\": \"2023-12-25\",\n \"origin\": \"manual\",\n \"memo\": \"\",\n \"attachments\": [],\n \"record_status\": \"posted\",\n \"location_id\": 123,\n \"vendor_id\": 123,\n \"purchase_order_id\": 123,\n \"exchange_rate_reason\": \"<string>\",\n \"requires_named_recognition_line\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.dualentry.com/public/v2/inventory-receipts/")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"date\": \"2023-12-25\",\n \"company_id\": 123,\n \"exchange_rate\": 123,\n \"items\": [\n {\n \"item_id\": 123,\n \"quantity\": 123,\n \"rate\": 123,\n \"uom_id\": 123,\n \"measurement\": {\n \"count\": 1,\n \"length\": 1,\n \"width\": 1,\n \"height\": 1,\n \"dimension_uom_id\": 123,\n \"consumed_count\": 1,\n \"consumed_length\": 1,\n \"consumed_width\": 1,\n \"consumed_height\": 1,\n \"excess_reason\": \"\"\n },\n \"id\": 123,\n \"position\": 1,\n \"memo\": \"\",\n \"serial_numbers\": [],\n \"serial_import_job_id\": 123,\n \"exchange_rate\": 1,\n \"purchase_order_line_id\": 123,\n \"location_id\": 123,\n \"dimension_count\": 123,\n \"dimension_length\": 123,\n \"dimension_width\": 123,\n \"dimension_height\": 123,\n \"dimension_uom_id\": 123,\n \"consumed_count\": 123,\n \"consumed_length\": 123,\n \"consumed_width\": 123,\n \"consumed_height\": 123,\n \"excess_reason\": \"<string>\",\n \"custom_fields\": [\n {}\n ],\n \"ownership_recognition_line_id\": 123,\n \"without_recognition\": false,\n \"allocations\": [\n \"<unknown>\"\n ]\n }\n ],\n \"custom_fields\": [\n {}\n ],\n \"transaction_date\": \"2023-12-25\",\n \"origin\": \"manual\",\n \"memo\": \"\",\n \"attachments\": [],\n \"record_status\": \"posted\",\n \"location_id\": 123,\n \"vendor_id\": 123,\n \"purchase_order_id\": 123,\n \"exchange_rate_reason\": \"<string>\",\n \"requires_named_recognition_line\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dualentry.com/public/v2/inventory-receipts/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"date\": \"2023-12-25\",\n \"company_id\": 123,\n \"exchange_rate\": 123,\n \"items\": [\n {\n \"item_id\": 123,\n \"quantity\": 123,\n \"rate\": 123,\n \"uom_id\": 123,\n \"measurement\": {\n \"count\": 1,\n \"length\": 1,\n \"width\": 1,\n \"height\": 1,\n \"dimension_uom_id\": 123,\n \"consumed_count\": 1,\n \"consumed_length\": 1,\n \"consumed_width\": 1,\n \"consumed_height\": 1,\n \"excess_reason\": \"\"\n },\n \"id\": 123,\n \"position\": 1,\n \"memo\": \"\",\n \"serial_numbers\": [],\n \"serial_import_job_id\": 123,\n \"exchange_rate\": 1,\n \"purchase_order_line_id\": 123,\n \"location_id\": 123,\n \"dimension_count\": 123,\n \"dimension_length\": 123,\n \"dimension_width\": 123,\n \"dimension_height\": 123,\n \"dimension_uom_id\": 123,\n \"consumed_count\": 123,\n \"consumed_length\": 123,\n \"consumed_width\": 123,\n \"consumed_height\": 123,\n \"excess_reason\": \"<string>\",\n \"custom_fields\": [\n {}\n ],\n \"ownership_recognition_line_id\": 123,\n \"without_recognition\": false,\n \"allocations\": [\n \"<unknown>\"\n ]\n }\n ],\n \"custom_fields\": [\n {}\n ],\n \"transaction_date\": \"2023-12-25\",\n \"origin\": \"manual\",\n \"memo\": \"\",\n \"attachments\": [],\n \"record_status\": \"posted\",\n \"location_id\": 123,\n \"vendor_id\": 123,\n \"purchase_order_id\": 123,\n \"exchange_rate_reason\": \"<string>\",\n \"requires_named_recognition_line\": false\n}"
response = http.request(request)
puts response.read_body{
"internal_id": 123,
"number": 123,
"transaction_id": 123,
"company_id": 123,
"company_name": "<string>",
"date": "2023-12-25",
"memo": "<string>",
"transaction_date": "2023-12-25",
"currency_iso_4217_code": "AED",
"exchange_rate": "<string>",
"amount": "<string>",
"items": [
{
"id": 123,
"item_id": 123,
"quantity": "<string>",
"rate": "<string>",
"location_name": "<string>",
"amount": "<string>",
"uom_id": 123,
"measurement": {
"count": "<string>",
"length": "<string>",
"width": "<string>",
"height": "<string>",
"dimension_uom_id": 123,
"consumed_count": "<string>",
"consumed_length": "<string>",
"consumed_width": "<string>",
"consumed_height": "<string>",
"excess_reason": "",
"consumed_base_quantity": "<string>",
"excess_quantity": "<string>",
"item_density": "<string>"
},
"position": 1,
"memo": "",
"serial_numbers": [],
"serial_import_job_id": 123,
"exchange_rate": "<string>",
"purchase_order_line_id": 123,
"location_id": 123,
"custom_fields": [],
"item_type": "<string>",
"hsn_sac_code": "<string>",
"uom_code": "<string>",
"base_quantity": "<string>",
"ownership_recognition_line_id": 123,
"allocations": [],
"landed_unit_cost": "<string>"
}
],
"record_status": "draft",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"attachments": [],
"created_by": {
"actor_type": "<string>",
"email": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"via": "<string>",
"agent_id": 123,
"agent_name": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
},
"updated_by": {
"actor_type": "<string>",
"email": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"via": "<string>",
"agent_id": 123,
"agent_name": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
},
"location_id": 123,
"location_name": "<string>",
"vendor_id": 123,
"purchase_order_id": 123,
"exchange_rate_reason": "",
"market_rate": "<string>",
"posting_rate": "<string>"
}{
"errors": {},
"success": false,
"error_code": "<string>",
"error_reason": "<string>"
}{
"errors": {},
"success": false,
"error_code": "<string>",
"error_reason": "<string>"
}{
"errors": {},
"success": false,
"error_code": "<string>",
"error_reason": "<string>"
}Validates all required fields and business rules.
Side effects
- If you set
record_statustopostedand sendpurchase_order_id, DualEntry counts this receipt toward the received quantity of that purchase order. - If the receipt is
draft, DualEntry still writes stock movements for tracked items at each item’slocation_id, or the receipt’slocation_idwhen the item omits one.
- Fails with
422if you set an inactive, archived, or draft customer or vendor, or an inactive company. - Fails with
422if you set the customer or vendor that stands for the record’s own company as a party. - A reference that the record or its linked source record already holds passes these checks.
Headers
Optional. A unique value (a UUID works well) identifying this operation. If the request is repeated with the same key, the original response is replayed instead of the operation running again, so a retry cannot create a duplicate record. Results are replayable for 48 hours. Reusing a key with a different request body returns 422.
Maximum string length:
255Query Parameters
Body
application/json
Available options:
AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BRL, BSD, BTN, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HTG, HUF, IDR, ILS, INR, IQD, IRR, ISK, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRU, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLL, SOS, SRD, STN, SVC, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VES, VND, VUV, WST, XAF, XAG, XAU, XCD, XDR, XOF, XPD, XPF, XPT, YER, ZAR, ZMW, ZWL Response
OK
Available options:
AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BRL, BSD, BTN, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HTG, HUF, IDR, ILS, INR, IQD, IRR, ISK, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRU, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLL, SOS, SRD, STN, SVC, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VES, VND, VUV, WST, XAF, XAG, XAU, XCD, XDR, XOF, XPD, XPF, XPT, YER, ZAR, ZMW, ZWL Was this page helpful?