Create warehouse entry

Create an entry in a non-integrated Fracttal warehouse using the warehouse entries web service.

Endpoint

POST https://app.fracttal.com/api/warehouse_entries_orders/{warehouse_code}

URL parameter

ParameterTypeRequiredDescription
warehouse_codeTextYesCode of the warehouse where the entry will be created. You can find it in Query warehouse, field code.

Entry types

You can create purchase entries and return entries.

Purchase entry

  • New purchase: send all resources that will enter the warehouse with their quantities and prices. For this type of entry, each resource is assigned the company’s default tax.
  • Purchase from a purchase order: send the ID of the purchase order created in the warehouse. You can create a full or partial entry for the resources associated with the selected purchase order. For a partial entry, send the items array with each item code and quantity. For a full entry, you do not need to send items.

Return entry

Use this entry type when materials delivered through a stock removal are returned.

To create it, send the ID of the issue created in the warehouse. You can create a full or partial entry for the resources associated with the issue. For a partial entry, send the items array with each item code and quantity. For a full entry, you do not need to send items.

Requirements

  • Send the code of a human resource responsible for the transaction in code_user.
  • Verify that the user associated with code_user has a Fracttal account.
  • When entries are related to warehouse movements, Fracttal automatically assigns the supplier, cost center, and currency from the source movement, either a purchase order or an issue. To modify those values, send the corresponding parameters in the request body.

Request body parameters

Send the following information in the request body.

ParameterTypeRequiredDescription
movement_typeNumberYesMovement type.
1 = Purchase
2 = Return
is_from_movementBooleanOptionalUse true to create an entry from an existing Fracttal movement, such as a purchase order or issue. Use false to create a new entry by manually entering the items. Default: false.
documentTextYesEntry reference. For purchase orders, send the purchase order folio_target. You can find it in Query purchase orders. For returns, send the issue document. You can find it in Query outbound movements. If the entry does not come from a movement, send a value of your choice.
code_userTextYesCode of the user associated with the human resource responsible for the transaction. You can find it in Query human resources, field code.
code_supplierTextOptionalCode of the third party classified as a supplier. You can find it in Query third party, field code.
value_cost_centerTextOptionalCost center code. You do not need to send it if you send description_cost_center. You can find it in Get cost centers, field value.
description_cost_centerTextOptionalCost center description. You do not need to send it if you send value_cost_center. You can find it in Get cost centers, field description.
noteTextOptionalNotes for the entry.
itemsArray of JSON objectsYes for new or partial entriesList of resources to add to the entry. For full entries from a purchase order or issue, you do not need to send this array.

items objects

ParameterTypeRequiredDescription
codeTextYesCode of the resource to add to the entry. The resource must be associated with the warehouse.
qtyTextYesQuantity of the resource.
unit_costReal numberYesUnit cost.
tax_nameTextOptionalTax name. If not sent, the company’s default tax is associated.
serial_numbersArray of stringsOptionalSend this field only when the associated resource is serial-controlled. The number of serials must match the resource quantity sent in qty.

Example: partial return entry

{
  "movement_type": "2",
  "is_from_movement": true,
  "code_user": "25198772-2",
  "document": "784",
  "note": "Entry from an issue by integration",
  "items": [
    {
      "code": "HERRA01",
      "qty": "1"
    }
  ]
}

Response parameters

ParameterTypeDescription
folio_targetIntegerMovement ID.
dateDateEntry date.
descriptionTextEntry note.
documentTextReference.
id_third_partyTextThird-party ID.
third_parties_nameTextThird-party name.
third_parties_codeTextThird-party code.
id_cost_centerTextCost center ID.
costs_center_valueTextCost center value.
costs_center_descriptionTextCost center description.
folio_sourceTextSource warehouse movement ID.
date_createTextMovement creation date.
id_priorityTextPriority ID.
priorities_descriptionTextPriority.
id_currencyNumberCurrency ID.
currency_descriptionTextCurrency description.
currency_symbolTextCurrency symbol.
movements_states_descriptionTextMovement status description.
movement_detailsJSON arrayList of items associated with the entry.

Example 1: new entry without associated transactions

Request

POST https://app.fracttal.com/api/warehouse_entries_orders/002
{
  "movement_type": "1",
  "code_user": "25198772-2",
  "code_supplier": "terc-00123e3",
  "value_cost_center": "500000000",
  "document": "In_7456",
  "note": "Entry by integration",
  "items": [
    {
      "code": "AFL_056",
      "qty": "5",
      "unit_cost": "135",
      "serial_numbers": ["A5402", "A5403", "A5404", "A5405", "A5406"]
    },
    {
      "code": "4890255A-R1",
      "qty": "20",
      "unit_cost": "750"
    },
    {
      "code": "MMRVH6900",
      "qty": "8",
      "unit_cost": "42533"
    },
    {
      "code": "38079",
      "qty": "50",
      "unit_cost": "5794"
    }
  ]
}

Response

{
  "success": true,
  "message": "200",
  "data": {
    "id": 3977,
    "folio_target": "MOV206ANTO",
    "date": "2019-10-18",
    "description": "Entry by integration",
    "document": "In_7456",
    "id_third_party": 2062,
    "third_parties_name": "adecco",
    "third_parties_code": "terc-00123e3",
    "id_cost_center": 421,
    "costs_center_description": "Fracttal 2019",
    "costs_center_value": "500000000",
    "folio_source": null,
    "date_create": "2019-10-18T17:13:50.008899+00:00",
    "id_priority": null,
    "priorities_description": null,
    "id_currency": 7,
    "currency_description": "PESO CHILENO",
    "currency_symbol": "$",
    "movements_states_description": "IN",
    "movement_details": [
      {
        "id_item": 5075,
        "items_description": "ACEITE VALVOLINE EURO  15W40 { 38079 } VALVOLINE",
        "code": "38079",
        "units_description": "LITROS",
        "qty": 50,
        "unit_cost": 5794,
        "total_cost": 344743,
        "tax_name": "IVA",
        "tax_rate": 19
      },
      {
        "id_item": 12437,
        "items_description": " FILTRO DE  MALLA HAGIE 690629 MMRVH6900  HYUNDAI { MMRVH6900 }",
        "code": "MMRVH6900",
        "units_description": "UNIDAD",
        "qty": 8,
        "unit_cost": 42533,
        "total_cost": 404914,
        "tax_name": "IVA",
        "tax_rate": 19
      },
      {
        "id_item": 5470,
        "items_description": "CORONA Y PIÑON EJE CORTO KIT 11X38 MFSerie 300 11X38 Fabricante { 4890255A-R1 }",
        "code": "4890255A-R1",
        "units_description": "UNIDAD",
        "qty": 20,
        "unit_cost": 750,
        "total_cost": 17850,
        "tax_name": "IVA",
        "tax_rate": 19
      },
      {
        "id_item": 122,
        "items_description": "AFLOJATODO  ACOMPA015 { AFL_056 } LUBRITEX S.A",
        "code": "AFL_056",
        "units_description": "Maquina",
        "qty": 5,
        "unit_cost": 135,
        "total_cost": 803.25,
        "tax_name": "IVA",
        "tax_rate": 19
      }
    ]
  },
  "total": 1
}

Example 2: new entry from a purchase order

Request

POST https://app.fracttal.com/api/warehouse_entries_orders/002
{
  "movement_type": "1",
  "is_from_movement": true,
  "code_user": "25198772-2",
  "document": "OC34ANTO",
  "note": "Entry from purchase order by integration"
}

Response

{
  "success": true,
  "message": "200",
  "data": {
    "id": 3998,
    "folio_target": "MOV224ANTO",
    "date": "2019-10-18",
    "description": "Entry from purchase order by integration",
    "document": "OC36ANTO",
    "id_third_party": 143,
    "third_parties_name": "FRACTTAL SPA",
    "third_parties_code": "036854",
    "id_cost_center": 22,
    "costs_center_description": "SUM3015",
    "costs_center_value": "",
    "folio_source": null,
    "date_create": "2019-10-18T19:27:07.279185+00:00",
    "id_priority": null,
    "priorities_description": null,
    "id_currency": 7,
    "currency_description": "PESO CHILENO",
    "currency_symbol": "$",
    "movements_states_description": "IN",
    "movement_details": [
      {
        "id_item": 5470,
        "items_description": "CORONA Y PIÑON EJE CORTO KIT 11X38  MFSerie 300 { 4890255A-R1 } Fabricante",
        "code": "4890255A-R1",
        "units_description": "UNIDAD",
        "qty": 45,
        "unit_cost": 980,
        "total_cost": 52479,
        "tax_name": "IVA",
        "tax_rate": 19
      },
      {
        "id_item": 20,
        "items_description": "LAINAS DE CALIBRACIÒN { 0000AC-21 }",
        "code": "0000AC-21",
        "units_description": "JUEGO",
        "qty": 5,
        "unit_cost": 6800,
        "total_cost": 40460,
        "tax_name": "IVA",
        "tax_rate": 19
      },
      {
        "id_item": 5075,
        "items_description": "ACEITE VALVOLINE EURO  15W40 { 38079 } VALVOLINE",
        "code": "38079",
        "units_description": "LITROS",
        "qty": 5,
        "unit_cost": 6894.86,
        "total_cost": 41024.4,
        "tax_name": "IVA",
        "tax_rate": 19
      }
    ]
  },
  "total": 1
}

Response
200
Language
LoadingLoading…