Skip to main content

Create an Internal Transfer

Endpoint Overview

This API endpoint provides a detailed overview of the endpoint responsible for creating an internal transfer within the Inventory module of the Juleb ERP.

Endpoint Details

  • Method: POST
  • URL: /api/v1/inventory/picking/internal-transfer

Parameters

  • Path Parameters: None
  • Query Parameters: None
{
"companyId": integer,
"lines": [
{
"productId": integer,
"productQty": integer,
"batch": string,
"expiry": string
}
],
"destCompanyId": integer
}

Response

  • 201 OK: The requested resource has been created.
  • 400 Bad Request: Bad request.
  • 401 Unauthorized: Unauthorized.

Response Body

{
"data": {
...record fields
}
}

Example

Request

const axios = require('axios');
const accountName = process.env.ACCOUNT_NAME;
const apiKey = process.env.API_KEY;
axios.post(`https://${accountName}.juleb.com/api/v1/inventory/picking/internal-transfer`, {
companyId: 1,
lines: [
{
productId: 34969,
productQty: 80,
batch: "13200001",
expiry: "30-09-2024"
}
],
destCompanyId: 2
}, {
headers: {
'accept': '*/*',
'Authorization': `Bearer ${apiKey}`,
'Content-Type': 'application/json'
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error('Error:', error);
});

Response

{
"data": {
"id": 11002,
"message_main_attachment_id": null,
"name": "Demo/INT/01395",
"origin": null,
"note": null,
"backorder_id": null,
"move_type": "direct",
"state": "assigned",
"group_id": null,
"priority": "1",
"scheduled_date": "2024-09-03T23:44:21.000Z",
"date": "2024-09-03T23:44:21.000Z",
"date_done": null,
"location_id": 8,
"location_dest_id": 23,
"picking_type_id": 5,
"partner_id": null,
"company_id": 1,
"user_id": 2,
"owner_id": null,
"printed": null,
"is_locked": true,
"immediate_transfer": false,
"create_uid": 2,
"create_date": "2024-09-03T23:44:21.877Z",
"write_uid": 2,
"write_date": "2024-09-03T23:44:21.877Z",
"sale_id": null,
"is_return": false,
"is_inter_transfer": null,
"is_inter_receive": null,
"dest_company_id": 2,
"source_company_id": null,
"origin_picking_id": null,
"transfer_request_id": null,
"request_accepted": null,
"waiting_picking": null,
"destination_company_id": null,
"scrap_moved": null,
"return_from_po": null,
"stock_return": null,
"made_return": null,
"receive_products": false,
"rsd_notification_id": null,
"notify_en": null,
"notify_ar": null,
"from_pos": false,
"code": null,
"explanation": null,
"lead_time": -1,
"internal_transfer_type": "outgoing",
"po_internal_count": 0,
"comment": null,
"currency_id": 153,
"related_internal_transfer_state": "none",
"is_reverse_transfer": null,
"reversed_from": null,
"reversed_trust_qty": "incoming",
"reversed_reason": null,
"return_order_id": null,
"driver_user_id": null,
"return_sale_id": null,
"mongo_cases": null,
"mongo_pallets": null,
"receipt_sale_id": null,
"access_token": null,
"calculate_vat_bonus_qty": false,
"reason": null,
"show_form_header": null,
"global_import": null,
"scanned_packages": null,
"vendor_bill_count": null,
"purchase_order_reference": null,
"amount_total_cost_price": 988.8,
"amount_total_sale_price": 920,
"pricelist_id": null,
"partner_ref": null,
"start_auto_matching": null,
"amount_after_discount": 1977.6,
"apply_discount": null,
"global_discount_type": null,
"discount_value": null,
"discount_account": null,
"custom_amount_after_discount": 1977.6,
"rsd_deserialization": true,
"tatmeen_permit_number": null,
"international_export": null
}
}