Update a purchase order

Through this EndPoint you can update the note and/or status of a purchase order.

The id parameter in the url is the id of the purchase order type movement

Body parameters

The following information must be sent in the request body.

Parameter

Type

Required

Description

note

Text

Optional

Note

status

Integer

Optional

Purchase order status id to update

5 - Total Delivery 6 - Cancelled

Note: Updating the status to "Total Delivery" will only change the Purchase Order status and will not generate a warehouse entry movement, so stock levels will not be affected. If you need to update stock levels, you should record an entry movement.

code_user

Text

Yes (when updating status)

Human resource code associated with the account responsible for the purchase order status change.

Output parameters

ParameterTypeDescription
idIntegerMovement id
dateDateDelivery date
descriptionTextEntry description
documentTextReference
id_third_partyTextThird party id
third_parties_nameTextThird party name
third_parties_codeTextThird party code
id_cost_centerTextCost center id
costs_center_descriptionTextCost center description
costs_center_valueTextCost center value
folio_sourceTextSource warehouse movement id
folio_targetTextTarget warehouse movement id
date_createTextMovement creation date
id_priorityTextPriority id
priorities_descriptionTextPriority
id_currencyIntegerCurrency id
currency_descriptionTextCurrency description
currency_symbolTextCurrency symbol
currency_symbolTextCurrency symbol
movements_states_descriptionTextMovement status description

Example:

Request: (PUT)https://app.fracttal.com/api/warehouse_purchase_orders/3737312

{
    "note": "Updated from API",
    "status": 6,
    "code_user": "JCDIAZG"
}
{
    "success": true,
    "message": "200",
    "data": {
        "id": 3737312,
        "id_company": 69,
        "id_movement_type": 10,
        "id_warehouse_source": null,
        "id_warehouse_target": 2,
        "folio_source": null,
        "folio_target": "33",
        "date": "2023-01-26",
        "description": "Orden de compra en SAP OC9809",
        "document": "EJM_OC",
        "id_third_party": null,
        "id_cost_center": null,
        "id_responsible": null,
        "id_movement_state": 5,
        "id_priority": null,
        "movements_types_description": "PURCHASE_ORDER",
        "movements_states_description": "TOTAL_DELIVERY",
        "warehouses_source_description": null,
        "warehouses_target_description": "Almacen Providencia",
        "third_parties_name": null,
        "costs_center_description": null,
        "responsible_code": null,
        "conditions_description": null,
        "priorities_description": null,
        "date_create": "2023-01-26T19:44:23.473496+00:00",
        "third_parties_code": null,
        "third_parties_address": null,
        "third_parties_telephone_1": null,
        "third_parties_telephone_2": null,
        "third_parties_email": null,
        "number_details": 1,
        "id_currency": null,
        "exchange_value": 1,
        "currency_description": "US Dollar",
        "currency_symbol": "$",
        "id_work_orders_tasks": null,
        "tasks_log_description": null,
        "items_log_description": null,
        "costs_center_value": null,
        "id_accounts_log": null,
        "accounts_log_name": null,
        "id_movement_state_reference": null,
        "id_movement_reference": null,
        "id_accounts": null,
        "approved": null,
        "approved_comment": null,
        "city": null,
        "is_input": null,
        "zip_code": null,
        "state": null,
        "id_item_log": null,
        "id_currency_iso": 251,
        "currency_code": "USD",
        "responsible_description": null,
        "id_condition": null
    },
    "total": 1
}
Language