Overview
Shipment receipt is used to receive products on purchase orders. After shipment receipt is created, inventory of product receives are updated.
Examples are provided in XML and in CURL command format.
URL | https://api_url/v1/shipment_receipt |
Supported Methods | GET, POST |
Description | Retrieve, Create Shipment Receipts for Purchase Orders |
Accepted Query Formats
GET /shipment_receipt[.format] | retrieve all shipment receipts |
GET /shipment_receipt/1[.format] | retrieve shipment receipt with ID = 1 |
GET /order[.format]?order_type_id=1 | retrieve all purchase orders |
GET /order[.format]?order_number=123 | find a purchase order or sales order with order number |
POST /shipment_receipt[.format] | create a new shipment receipt |
Filters
You can use different filters on the shipment receipt API. Chain different filters using & .
part_id: Find all shipment receipts for a product with a part_id.
facility_id: Find all shipment receipts with a facility_id
since_id: Find all shipment receipts with a id that is larger than the passed in id
Examples
Retrieve all shipment receipts in XML format:
$ curl -i --header "VERSACCOUNTS_AUTHORIZATION:4096900e0b3f5a4297e3cd5823f734f0095e66" https://api_url/v1/shipment_receipt.xml
Response
<?xml version="1.0" encoding="UTF-8"?>
<shipment-receipts type="array">
<shipment-receipt>
<id type="integer">24787</id>
<quantity-accepted type="decimal">1.0</quantity-accepted>
<accepted-measurement-unit-id type="integer">4470</accepted-measurement-unit-id>
<quantity-rejected type="decimal">0.0</quantity-rejected>
<rejected-measurement-unit-id type="integer">4470</rejected-measurement-unit-id>
<created-at type="dateTime">2018-04-09T09:00:33Z</created-at>
<effective-date type="dateTime">2018-04-09T00:00:00Z</effective-date>
<void type="boolean">false</void>
<facility-id type="integer">1104</facility-id>
<lot-id type="integer">7562</lot-id>
<part-id type="integer">26192</part-id>
<product-id type="integer">29893</product-id>
<inventory-item-id type="integer">72019</inventory-item-id>
<order-item-id type="integer">1411883</order-item-id>
<order-item>
<id type="integer">1411883</id>
<order-id type="integer">307302</order-id>
<order-item-seq-id type="integer">1</order-item-seq-id>
<quantity type="decimal">21.0</quantity>
<measurement-unit-id type="integer">4470</measurement-unit-id>
<product-id type="integer">29893</product-id>
<per-unit-cost type="decimal">0.0</per-unit-cost>
<work-orders type="array"/>
<order>
<id type="integer">307302</id>
<order-number type="integer">1</order-number>
<supplier>
<id type="integer">12755</id>
<party>
<id type="integer">313925</id>
<created-on type="dateTime">2018-04-09T07:22:32Z</created-on>
<updated-on type="dateTime">2018-04-09T07:22:32Z</updated-on>
<company-name>Supplier1</company-name>
<surname>Surname</surname>
<given-name>Given </given-name>
<address-line-1>Address </address-line-1>
<address-line-2>line </address-line-2>
<address-line-3>16 Mountainview Road South</address-line-3>
<postal-zip-code>L7G 4K1</postal-zip-code>
<contact-number-1>9058736247</contact-number-1>
<contact-number-2></contact-number-2>
<email></email>
<province-state>Ontario</province-state>
<city>GEORGETOWN</city>
<country>Kanada</country>
<practical-name>Supplier1</practical-name>
</party>
</supplier>
</order>
</order-item>
<facility>
<id type="integer">1104</id>
<name>805 SW Broadway</name>
<code>WHS</code>
</facility>
<product>
<id type="integer">29893</id>
<name>Product1</name>
<product-service-flag type="boolean">false</product-service-flag>
<measurement-unit-id type="integer">4470</measurement-unit-id>
<part>
<id type="integer">26192</id>
<part-number>lot1</part-number>
<measurement-unit-id type="integer">4470</measurement-unit-id>
</part>
<product-category>
<id type="integer">3940</id>
<name>Goods Purchased for Resale</name>
<for-purchase type="boolean">true</for-purchase>
<for-sale type="boolean">true</for-sale>
<revenue-gl-account-id type="integer">46430</revenue-gl-account-id>
<expense-gl-account-id type="integer">46441</expense-gl-account-id>
</product-category>
</product>
<related-shipment-id type="integer">19361</related-shipment-id>
</shipment-receipt>
<shipment-receipt>
<id type="integer">24788</id>
<quantity-accepted type="decimal">1.0</quantity-accepted>
<accepted-measurement-unit-id type="integer">4470</accepted-measurement-unit-id>
<quantity-rejected type="decimal">0.0</quantity-rejected>
<rejected-measurement-unit-id type="integer">4470</rejected-measurement-unit-id>
<created-at type="dateTime">2018-04-09T09:00:35Z</created-at>
<effective-date type="dateTime">2018-04-09T00:00:00Z</effective-date>
<void type="boolean">false</void>
<facility-id type="integer">1104</facility-id>
<lot-id type="integer">7549</lot-id>
<part-id type="integer">26192</part-id>
<product-id type="integer">29893</product-id>
<inventory-item-id type="integer">72020</inventory-item-id>
<order-item-id type="integer">1411883</order-item-id>
<order-item>
<id type="integer">1411883</id>
<order-id type="integer">307302</order-id>
<order-item-seq-id type="integer">1</order-item-seq-id>
<quantity type="decimal">21.0</quantity>
<measurement-unit-id type="integer">4470</measurement-unit-id>
<product-id type="integer">29893</product-id>
<per-unit-cost type="decimal">0.0</per-unit-cost>
<work-orders type="array"/>
<order>
<id type="integer">307302</id>
<order-number type="integer">1</order-number>
<supplier>
<id type="integer">12755</id>
<party>
<id type="integer">313925</id>
<created-on type="dateTime">2018-04-09T07:22:32Z</created-on>
<updated-on type="dateTime">2018-04-09T07:22:32Z</updated-on>
<company-name>Supplier1</company-name>
<surname>Surname</surname>
<given-name>Given </given-name>
<address-line-1>Address </address-line-1>
<address-line-2>line </address-line-2>
<address-line-3>16 Mountainview Road South</address-line-3>
<postal-zip-code>L7G 4K1</postal-zip-code>
<contact-number-1>9058736247</contact-number-1>
<contact-number-2></contact-number-2>
<email></email>
<province-state>Ontario</province-state>
<city>GEORGETOWN</city>
<country>Kanada</country>
<practical-name>Supplier1</practical-name>
</party>
</supplier>
</order>
</order-item>
<facility>
<id type="integer">1104</id>
<name>805 SW Broadway</name>
<code>WHS</code>
</facility>
<product>
<id type="integer">29893</id>
<name>Product1</name>
<product-service-flag type="boolean">false</product-service-flag>
<measurement-unit-id type="integer">4470</measurement-unit-id>
<part>
<id type="integer">26192</id>
<part-number>lot1</part-number>
<measurement-unit-id type="integer">4470</measurement-unit-id>
</part>
<product-category>
<id type="integer">3940</id>
<name>Goods Purchased for Resale</name>
<for-purchase type="boolean">true</for-purchase>
<for-sale type="boolean">true</for-sale>
<revenue-gl-account-id type="integer">46430</revenue-gl-account-id>
<expense-gl-account-id type="integer">46441</expense-gl-account-id>
</product-category>
</product>
<related-shipment-id type="integer">19361</related-shipment-id>
</shipment-receipt>
</shipment-receipts>
Create a new shipment receipt:
response in JSON format:
Required fields are order_number, product_identifier, quantity_accepted, effective_date
product_identifier can either be part number or product trading names.
if order_item_id is provided, order item is first found by order_item_id. The order item found must have the same product in product_identifier.
if order_item_seq_number is provided, first find the order item by order item sequence number.
If order_item_id and order_item_seq_number are not provided, first find the first order item with the product provided in product_identifier that has quantity outstanding that is bigger than quantity_accepted.
facility_id is not required. If provided, this will be the facility the new inventory is received in.
$ curl -X POST -H "Content-Type: application/json" -d @new_receipt.json -i --header "VERSACCOUNTS_AUTHORIZATION:4096900e0b3f5a4297e3c823f734f0095e6" https://api_url/v1/shipment_receipt
Posted JSON file:
{
"shipment_receipt":
{
"order_number": "20028",
"product_identifier": "TestPart1",
"quantity_accepted": "1",
"effective_date": "2024-10-19"
}
}
Response:
{
"id": 176551,
"shipment_package_id": 349855,
"product_id": 29925,
"item_description": null,
"quantity_accepted": "1.0",
"accepted_measurement_unit_id": 4470,
"quantity_rejected": "0.0",
"rejected_measurement_unit_id": 4470,
"rejection_reason_id": null,
"order_item_id": 66370110,
"internal_organization_id": 585,
"firm_id": 547,
"created_at": "2024-10-18T20:40:35.034Z",
"updated_at": "2024-10-18T20:40:35.034Z",
"effective_date": "2024-10-18T00:00:00.000Z",
"void": false,
"return_shipment_item_id": null,
"lot_id": null,
"facility_id": 1104,
"part_id": 26224,
"inventory_item_id": null,
"stocked": false,
"dock_id": null,
"date_for_price_lookup": null,
"quantity_in_order_unit": "1.0",
"to_stock": true,
"effective_time": null,
"quantity_expected": null,
"inventory_item_conversion_id": null,
"estimated_tariff_amount": null,
"skip_billing": false
}
Comments and Suggestions
0 comments
Article is closed for comments.
Related articles